Why doesn't objdump display assembly code mixed with source code?

Nick Clifton nickc@redhat.com
Thu Mar 13 09:31:00 GMT 2008


Hi PRC,

> I change the linker script to:

There are two problems with your amended linker script:

   1.  It does not include all of the DWARF2 debugging sections.
       In particular the .debug_loc section is missing which is
       needed in order for objdump to be able to display the
       source code alongside the disassembly.

   2.  It allows the dwarf sections to be placed at non-zero
       address which corrupts their behaviour.

Please try the attached amended version of your script which should 
provide the desired results.

Cheers
   Nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: link.t
Type: text/troff
Size: 1175 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20080313/18b4a502/attachment.t>


More information about the Binutils mailing list