I recently switched from GCC 4.1.2 to 4.3.2. I use -g when compiling
and linking. I use
objdump -dl
on various .o and .so files to get a disassembly with source line number
info.
Before switching to 4.3.2, that worked on both .o files and .so files.
After switching, it only works on the .o files. The .so files give
disassembly with no line number info.
I'm also using Opannotate and gdb and other tools that either use
objdump or share objdump's inability to see the line number info in
these .so files.
Any suggestions on diagnosing or correcting this problem? How can I
tell if the problem is in the .so file or in the tools I've tried for
looking at the .so file.
Is something wrong with objdump (GNU Binutils 2.18)? Do I need a newer
version of some .so or .a file that objdump was linked against?
The .so files used by objdump are
/lib64/tls/libc.so.6 -> libc-2.3.4.so
and
/lib64/ld-linux-x86-64.so.2 -> ld-2.3.4.so
I'm not sure what versions of which .a file are pulled in by the build
of objdump.
Am I doing something wrong in building the .so files? Does -g need some
further qualification in 4.3.2 that it didn't need in 4.1.2?
The local sys admin tried rebuilding binutils with GCC 4.3.2. The
behavior is identical. The new one depends on:
/usr/local/binutils/lib/libopcodes-2.18.so
/usr/local/binutils/lib/libbfd-2.18.so
in addition to the .so files the previous one used. That makes no
difference.