summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorStan Cox <scox@redhat.com>2009-09-28 22:40:33 -0400
committerStan Cox <scox@redhat.com>2009-09-28 22:40:33 -0400
commit1b51c98091d52ccc890c36bb32ef74bf4c7b0f35 (patch)
treeb0bba6b995f998372dcdbcd34138f6a4ac9fd51a /tapsets.cxx
parent4e06b5e236b3d281d8be0d7828088e9a8da86e5e (diff)
downloadsystemtap-steved-1b51c98091d52ccc890c36bb32ef74bf4c7b0f35.tar.gz
systemtap-steved-1b51c98091d52ccc890c36bb32ef74bf4c7b0f35.tar.xz
systemtap-steved-1b51c98091d52ccc890c36bb32ef74bf4c7b0f35.zip
* tapsets.cxx (sdt_query::record_semaphore): Adjust addr relative to
relocation base.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index abd46aee..fdbddd9e 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -3708,8 +3708,12 @@ sdt_query::record_semaphore (vector<derived_probe *> & results, unsigned start)
string semaphore = probe_name + "_semaphore";
Dwarf_Addr addr = lookup_symbol_address(dw.module, semaphore.c_str());
if (addr)
- for (unsigned i = start; i < results.size(); ++i)
- sess.sdt_semaphore_addr.insert(make_pair(results[i], addr));
+ {
+ if (dwfl_module_relocations (dw.module) > 0)
+ dwfl_module_relocate_address (dw.module, &addr);
+ for (unsigned i = start; i < results.size(); ++i)
+ sess.sdt_semaphore_addr.insert(make_pair(results[i], addr));
+ }
}