Question: using objdump for disassembly and inserting source code with object compiled with -gsplit-dwarf
ISHIKAWA,chiaki
ishikawa@yk.rim.or.jp
Fri Jun 17 20:48:00 GMT 2016
Hi,
I have been using GNU ld.gold with gcc's -gsplit-dwarf feature very
successfully to build Mozilla's thunderbird mail client.
It is a big binary but the use of -gsplit-dwarf and ld.gold has made the
linking manageable.
I have come to understand a subtle issue, though.
In the traditional full dwarf information inside .o file means,
objdump -S -d test.o
can disassemble the object file and intersperse the
lines from the original source file.
After testing with a simple small C source file,
I suppose objdump can work with an object compiled with -gsplit-dwarf to
list disassembly mixed with the original source file.
However, for a medium size c++ file, I found that the source inclusion
is not very good. The function signature is inserted, but no source code
lines somehow.
Is this to be expected?
Or is there a known bug with objdump?
It is possible that gcc 5.3 or 6.1 may not be producing correct DWARF in
.o and .dwp which objdump can grok, but I have no idea.
I can send a sample .o, .dwo, and the source file for review.
There must be something wrong because in the objdump -S -d listing
I see a repetition of a source snippet smallish helper function over and
over again.
That can't be right.
I have tested with the following version:
objdump --version
GNU objdump (GNU Binutils) 2.26.51.20160102
TIA
CI
More information about the Binutils
mailing list