summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2009-04-08 17:15:01 -0700
committerRoland McGrath <roland@redhat.com>2009-04-08 17:15:01 -0700
commit785dbb11eddd5d802a183552704be33f7493b671 (patch)
treef40026abe27ab383d6c592764fa0872ec6364a93
parent8987b87421d8bb40ca011e8020782de169d9a9c1 (diff)
downloadelfutils-785dbb11eddd5d802a183552704be33f7493b671.tar.gz
Fix double-adjust for ET_REL.
-rw-r--r--libdwfl/ChangeLog3
-rw-r--r--libdwfl/dwfl_module_getsym.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index 91c2f315..a2487ed0 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -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.
diff --git a/libdwfl/dwfl_module_getsym.c b/libdwfl/dwfl_module_getsym.c
index a4ce2844..8f02d71f 100644
--- a/libdwfl/dwfl_module_getsym.c
+++ b/libdwfl/dwfl_module_getsym.c
@@ -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;
}