]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Fix double-adjust for ET_REL.
authorRoland McGrath <roland@redhat.com>
Thu, 9 Apr 2009 00:15:01 +0000 (17:15 -0700)
committerRoland McGrath <roland@redhat.com>
Thu, 9 Apr 2009 00:15:01 +0000 (17:15 -0700)
libdwfl/ChangeLog
libdwfl/dwfl_module_getsym.c

index 91c2f3150b2e0a3b3d14fbdec6844d8e5b3d254c..a2487ed0c8110131520887df4827aef93097e7b1 100644 (file)
@@ -1,5 +1,8 @@
 2009-04-08  Roland McGrath  <roland@redhat.com>
 
+       * dwfl_module_getsym.c: Don't adjust for bias again after
+       __libdwfl_relocate_value.
+
        * relocate.c (__libdwfl_relocate_value): Don't adjust a value from
        a non-SHF_ALLOC section.
        (relocate_getsym): Test st_shndx for SHN_* values, not *SHNDX.
index a4ce28446c61c0b60a0f6e3f3c9addb3b1b379f3..8f02d71fcb720dcebe9b8a40d71bc0d79cafa568 100644 (file)
@@ -99,8 +99,9 @@ dwfl_module_getsym (Dwfl_Module *mod, int ndx,
              return NULL;
            }
        }
-      /* Apply the bias to the symbol value.  */
-      sym->st_value += mod->symfile->bias;
+      else
+       /* Apply the bias to the symbol value.  */
+       sym->st_value += mod->symfile->bias;
       break;
     }