Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
Languages and Scripting
cancel
Showing results for 
Search instead for 
Did you mean: 

Error archiving ELF-64 relocatable object files

Dattesh Lotlikar
Occasional Advisor

Error archiving ELF-64 relocatable object files

All,
This problem is related to archiving 64bit object files.
I have a static library of 64bit compiled object files. Now when I use this library to built a shared library / executable(using 64bit CC flags) linker throws following error.

ld: (Warning) Cannot load library symbol table in /project/lib/libasn.a, it might be missing or corrupted. Skipping library /project/lib/libasn.a.
1 warnings.

When I did "nm /project/lib/libasn.a" it gives following error:
nm: bits.o: File format not recognized

I guess this is common issue, most of you must have faced while trying to build 64bit executables. Do reply if you have any clue or pointers on this.
Thanks & Regards,
Dattesh Lotlikar
2 REPLIES
Laurent Menase
Honored Contributor

Re: Error archiving ELF-64 relocatable object files

Hi,
You should try a
file libasn.a
mkdir /tmp/extract;cd /tmp/extract
ar x /project/lib/libasn.a
file *
I think probably bits.o will not be of the right type.
Highlighted
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Error archiving ELF-64 relocatable object files

have you run strip or something on that library.

What were the tags you used to build library.
Either the library is corrupted or symbol table is not available.

You can check for library corruption by
file lib.a
Vibhor Kumar Agarwal