summaryrefslogtreecommitdiffstats
path: root/dwflpp.cxx
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-06-18 17:54:15 +0200
committerMark Wielaard <mjw@redhat.com>2009-06-18 17:59:16 +0200
commitd2309c6c3fb97cc0c8931b59e33fe18820b63c5d (patch)
tree6a1a3ecec5d4a9e8710a685e481847076fb64b1e /dwflpp.cxx
parent76248b8b52d687abb52c5e69eda7927f84d2e483 (diff)
downloadsystemtap-steved-d2309c6c3fb97cc0c8931b59e33fe18820b63c5d.tar.gz
systemtap-steved-d2309c6c3fb97cc0c8931b59e33fe18820b63c5d.tar.xz
systemtap-steved-d2309c6c3fb97cc0c8931b59e33fe18820b63c5d.zip
PR10273 Correctly adjust libdw address for dwfl dwarf bias.
* dwflpp.cxx (relocate_address): Adjust reloc_addr at start, not afterwards.
Diffstat (limited to 'dwflpp.cxx')
-rw-r--r--dwflpp.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/dwflpp.cxx b/dwflpp.cxx
index e01c6974..61627e16 100644
--- a/dwflpp.cxx
+++ b/dwflpp.cxx
@@ -2341,11 +2341,13 @@ dwflpp::get_blacklist_section(Dwarf_Addr addr)
Dwarf_Addr
-dwflpp::relocate_address(Dwarf_Addr addr,
+dwflpp::relocate_address(Dwarf_Addr dw_addr,
string& reloc_section,
string& blacklist_section)
{
- Dwarf_Addr reloc_addr = addr;
+ // PR10273
+ // libdw address, so adjust for bias gotten from dwfl_module_getdwarf
+ Dwarf_Addr reloc_addr = dw_addr + module_bias;
if (!module)
{
assert(module_name == TOK_KERNEL);
@@ -2364,14 +2366,13 @@ dwflpp::relocate_address(Dwarf_Addr addr,
if (reloc_section == "" && dwfl_module_relocations (module) == 1)
{
- blacklist_section = get_blacklist_section(addr);
+ blacklist_section = get_blacklist_section(dw_addr);
reloc_section = ".dynamic";
- reloc_addr += module_bias; // PR10273
}
}
else
{
- blacklist_section = get_blacklist_section(addr);
+ blacklist_section = get_blacklist_section(dw_addr);
reloc_section = ".absolute";
}
return reloc_addr;