diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-11-16 21:34:00 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-11-16 21:34:00 +0100 |
commit | a295050e60affe0bb55fc2d46637314c0822f35d (patch) | |
tree | 51f6a7cf590e5da3ee2a12faa2643c5fabdba2cd /dwflpp.cxx | |
parent | 01a71905151a751fc81a5f58743f6915378be20a (diff) | |
download | systemtap-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 'dwflpp.cxx')
-rw-r--r-- | dwflpp.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -1502,12 +1502,11 @@ dwflpp::emit_address (struct obstack *pool, Dwarf_Addr address) } else { - throw semantic_error ("cannot relocate user-space dso (?) address"); -#if 0 - // This would happen for a Dwfl_Module that's a user-level DSO. - obstack_printf (pool, " /* %s+%#" PRIx64 " */", - modname, address); -#endif + enable_task_finder (sess); + obstack_printf (pool, "({ static unsigned long addr = 0; "); + obstack_printf (pool, "if (addr==0) addr = _stp_module_relocate (\"%s\",\"%s\",%#" PRIx64 "); ", + modname, ".dynamic", reloc_address); + obstack_printf (pool, "addr; })"); } } else |