This is the mail archive of the
mailing list for the binutils project.
Question: using objdump for disassembly and inserting source code with object compiled with -gsplit-dwarf
- From: "ISHIKAWA,chiaki" <ishikawa at yk dot rim dot or dot jp>
- To: Binutils <binutils at sourceware dot org>
- Date: Sat, 18 Jun 2016 05:48:20 +0900
- Subject: Question: using objdump for disassembly and inserting source code with object compiled with -gsplit-dwarf
- Authentication-results: sourceware.org; auth=none
- Authentication-results: access07.SiriusCloud.jp; dkim=none (no signature) header.i=unknown; x-dkim-adsp=none (insecure policy)
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
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
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
That can't be right.
I have tested with the following version:
GNU objdump (GNU Binutils) 184.108.40.20660102