bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/6761] abbrev_offset in DWARF2 info is set incorrectly (zero) by


From: nickc at redhat dot com
Subject: [Bug ld/6761] abbrev_offset in DWARF2 info is set incorrectly (zero) by ld
Date: 24 Jul 2008 15:12:17 -0000

------- Additional Comments From nickc at redhat dot com  2008-07-24 15:12 
-------
Hi Bjarne,

  This a GDB problem, not a binutils one.  The reason that the abbrev offset
field is not initialised in the object file is that its final value is not
known.  Instead there is a relocation that is responsible for filling in the
value when the object file is linked into the final executable.

  The problem with GDB has two parts.  Firstly the code in
dwarf2read.c:read_partial_die that processes the DW_AT_sibiling attribute does
not check to see if the offset is valid.  This is what eventually leads to the
seg-fault.  The second problem is much bigger - GDB is not processing the relocs
in the object file before attempting to interpret the debug sections and this is
why it is having problems.

  If you run "readelf -wi org.o" for example on your test binary you will see
that the "Abbrev Offset" value for the second compilation unit is 86 - the
correct value.  This is despite the fact that in the org.o file, the field is
set to 0.  Readelf can do this because it has code to process the relocs before
it interprets the contents of the debug sections.  See
binutils/readelf.c:debug_apply_relocations for how this is done.

Cheers
  Nick


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


http://sourceware.org/bugzilla/show_bug.cgi?id=6761

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]