]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: Fix relocating of abbrev table offset in CU header loader
authorPetr Machata <pmachata@redhat.com>
Mon, 23 Nov 2009 12:32:32 +0000 (13:32 +0100)
committerPetr Machata <pmachata@redhat.com>
Wed, 18 Aug 2010 12:55:13 +0000 (14:55 +0200)
src/dwarflint/check_debug_info.cc

index 85b927b6fd4a2c83c52a80c2611b84a723b762d8..cf8c1b7fb464456a762f5c3c33fe159a6548104a 100644 (file)
@@ -182,12 +182,12 @@ namespace
          wr_error (head.where) << "invalid 64-bit unit in DWARF 2 format.\n";
        head.version = version;
 
-       /* Abbrev offset.  */
-       uint64_t ctx_offset = read_ctx_get_offset (&ctx) + head.offset;
+       /* Abbrev table offset.  */
+       uint64_t ctx_offset = read_ctx_get_offset (&ctx);
        if (!read_ctx_read_offset (&ctx, head.offset_size == 8,
                                   &head.abbrev_offset))
          {
-           wr_error (head.where) << "can't read abbrev offset." << std::endl;
+           wr_error (head.where) << "can't read abbrev table offset." << std::endl;
            throw check_base::failed ();
          }
 
@@ -202,7 +202,7 @@ namespace
          }
        else if (file->ehdr.e_type == ET_REL)
          wr_message (head.where, cat (mc_impact_2, mc_info, mc_reloc))
-           << pri::lacks_relocation ("abbrev offset") << std::endl;
+           << pri::lacks_relocation ("abbrev table offset") << std::endl;
 
        /* Address size.  */
        if (!read_address_size (file, &ctx, &head.address_size, &head.where))