Blob Blame History Raw
commit 7c71382294af69f075c891a3418906c842491e4c
Author: Jason P. Leasure <jpleasu@super.org>
Date:   Wed Jan 14 09:26:55 2015 -0500

    libdw: fix offset for sig8 lookup in dwarf_formref_die
    
    The type_offset of a type unit header is relative to the beginning
    of the type unit header.
    
    Signed-off-by: Jason P. Leasure <jpleasu@super.org>

diff --git a/libdw/dwarf_formref_die.c b/libdw/dwarf_formref_die.c
index 63f6697..8b92e22 100644
--- a/libdw/dwarf_formref_die.c
+++ b/libdw/dwarf_formref_die.c
@@ -95,7 +95,7 @@ dwarf_formref_die (attr, result)
 
       datap = cu->dbg->sectiondata[IDX_debug_types]->d_buf;
       size = cu->dbg->sectiondata[IDX_debug_types]->d_size;
-      offset = cu->type_offset;
+      offset = cu->start + cu->type_offset;
     }
   else
     {