Problem
I compile an ELF object file and archive this into a static
library. If I compile this library with a program "test.c"
with the command:cc -g test.c mylib.a -o testand then try to use either dbxtra or dbXtra, I get this message:
warning: Object file contains no symbolic information Cause
The compiler produces COFF objects by default. When COFF files are
converted to ELF, all debugging information is lost. When ld looks
at the objects it's linking, if any are ELF, it invokes the ELF
linker. In the case of an archive, it looks at the first object in
the archive, even though it is possible that no objects from the
archive end up in the object. If ld notices that mylib.a has an ELF
object first, it will invoke the ELF linker. But since test.c was
compiled COFF (the default), the debugging information is stripped. Solution
You must explicitly specify "-b elf" if there are any ELF objects
that will be linked if you wish to use dbXtra or dbxtra. In this
example, the program should be compiled with:cc -belf -g test.c mylib.a -o testThis will produce a binary with symbolic information.