Operating System - Linux
1752725 Members
5438 Online
108789 Solutions
New Discussion юеВ

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 2
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.
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