Problem while linking .a file

N

Nithya

Hi,
I encountered a problem when compiling multiple files with make file on
solaris. The program uses a thrid party library file(.a) and when
linking it to the program with -l option i get a error stating:

ld: elf error: file library.a(lib_obj.o): elf_strptr: Request error: no
string table
ld: elf error: file library.a: elf_begin: Format error: archive fmag
ld: fatal: File processing errors. No output written to Main
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `Main'

As this error states there is no string table associated with one of
the .o file archived to the library. I confirmed it by using nm
utility. It listed the string tables associated with many other .o
files but failed only one. Is there any way that i can generate the
string table by just having this archive?

And i have no idea what Format error is supposed to mean.... could
someone please throw some light on this?

Thanks a lot....
 
M

mlimber

[cross-posting deleted]
Hi,
I encountered a problem when compiling multiple files with make file on
solaris. The program uses a thrid party library file(.a) and when
linking it to the program with -l option i get a error stating:

ld: elf error: file library.a(lib_obj.o): elf_strptr: Request error: no
string table
ld: elf error: file library.a: elf_begin: Format error: archive fmag
ld: fatal: File processing errors. No output written to Main
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `Main'

As this error states there is no string table associated with one of
the .o file archived to the library. I confirmed it by using nm
utility. It listed the string tables associated with many other .o
files but failed only one. Is there any way that i can generate the
string table by just having this archive?

And i have no idea what Format error is supposed to mean.... could
someone please throw some light on this?

Thanks a lot....

This is off-topic here (see
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9).
Perhaps one of your cross-posts will be of help.

Cheers! --M
 
C

Casper H.S. Dik

Nithya said:
As this error states there is no string table associated with one of
the .o file archived to the library. I confirmed it by using nm
utility. It listed the string tables associated with many other .o
files but failed only one. Is there any way that i can generate the
string table by just having this archive?

No, you cannot generate the string table from the object. The information
appears lost. The best you can do is rebuild the archive without the
particular .o file in it.

Casper
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top