summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-11-16 21:34:00 +0100
committerMark Wielaard <mjw@redhat.com>2009-11-16 21:34:00 +0100
commita295050e60affe0bb55fc2d46637314c0822f35d (patch)
tree51f6a7cf590e5da3ee2a12faa2643c5fabdba2cd /runtime
parent01a71905151a751fc81a5f58743f6915378be20a (diff)
downloadsystemtap-steved-a295050e60affe0bb55fc2d46637314c0822f35d.tar.gz
systemtap-steved-a295050e60affe0bb55fc2d46637314c0822f35d.tar.xz
systemtap-steved-a295050e60affe0bb55fc2d46637314c0822f35d.zip
PR10010 Support $globals in shared libraries.
* dwflpp.cxx (dwflpp::emit_address): Enable task finder and emit a _stp_module_relocate for the ".dynamic" section when seeing a user-space dso address. * runtime/sym.c (_stp_mod_sec_lookup): Remove .dynamic section addr cheat. (_stp_tf_mmap_cb): Add cheat here.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/sym.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/sym.c b/runtime/sym.c
index 0baa1a5e..61282183 100644
--- a/runtime/sym.c
+++ b/runtime/sym.c
@@ -45,6 +45,11 @@ static int _stp_tf_mmap_cb(struct stap_task_finder_target *tgt,
path);
#endif
module = _stp_modules[i];
+ // cheat...
+ if ((strcmp(".dynamic",
+ module->sections[0].name) == 0)
+ && module->sections[0].addr == 0)
+ module->sections[0].addr = addr;
break;
}
}
@@ -138,8 +143,6 @@ static struct _stp_module *_stp_mod_sec_lookup(unsigned long addr,
*sec = &m->sections[0]; // XXX check actual section and relocate
dbug_sym(1, "found section %s in module %s at 0x%lx\n",
m->sections[0].name, m->name, vm_start);
- if (strcmp(".dynamic", m->sections[0].name) == 0)
- m->sections[0].addr = vm_start; // cheat...
return m;
}
}