diff options
author | Dave Brolley <brolley@redhat.com> | 2009-11-23 19:08:51 -0500 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-11-23 19:08:51 -0500 |
commit | 5d1c958ce2dcc0f28c1bd13b8e005c0c2ad1cdba (patch) | |
tree | e44ad8807e0b5b2e1bb85682f677d492f1195dbf /runtime | |
parent | 562d60b004e3d7ae73c1c7508be529006bd6430f (diff) | |
parent | 90bba7158de040705a101ba1fdf6062866b4b4e9 (diff) | |
download | systemtap-steved-5d1c958ce2dcc0f28c1bd13b8e005c0c2ad1cdba.tar.gz systemtap-steved-5d1c958ce2dcc0f28c1bd13b8e005c0c2ad1cdba.tar.xz systemtap-steved-5d1c958ce2dcc0f28c1bd13b8e005c0c2ad1cdba.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Conflicts:
configure
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/map.c | 2 | ||||
-rw-r--r-- | runtime/sym.c | 18 | ||||
-rw-r--r-- | runtime/sym.h | 4 |
3 files changed, 21 insertions, 3 deletions
diff --git a/runtime/map.c b/runtime/map.c index 74467f30..20d8a48c 100644 --- a/runtime/map.c +++ b/runtime/map.c @@ -412,7 +412,7 @@ static void _stp_pmap_del(PMAP pmap) } /* sort keynum values */ -#define SORT_COUNT -5 +#define SORT_COUNT -5 /* see also translate.cxx:visit_foreach_loop */ #define SORT_SUM -4 #define SORT_MIN -3 #define SORT_MAX -2 diff --git a/runtime/sym.c b/runtime/sym.c index 0baa1a5e..fd9863dd 100644 --- a/runtime/sym.c +++ b/runtime/sym.c @@ -45,6 +45,22 @@ static int _stp_tf_mmap_cb(struct stap_task_finder_target *tgt, path); #endif module = _stp_modules[i]; + // cheat... + // We are abusing the "first" section address + // here to indicate where the module (actually + // first segment) is loaded (which is why we + // are ignoring the offset). It would be good + // to redesign the stp_module/stp_section + // data structures to better align with the + // actual memory mappings we are interested + // in (especially the "section" naming is + // slightly confusing since what we really + // seem to mean are elf segments (which can + // contain multiple elf sections). + if ((strcmp(".dynamic", + module->sections[0].name) == 0) + && module->sections[0].addr == 0) + module->sections[0].addr = addr; break; } } @@ -138,8 +154,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; } } diff --git a/runtime/sym.h b/runtime/sym.h index ca69345f..9f2bdfd0 100644 --- a/runtime/sym.h +++ b/runtime/sym.h @@ -66,6 +66,10 @@ static unsigned _stp_num_modules; /* load address, fixup by transport symbols _stp_do_relocation */ static unsigned long _stp_kretprobe_trampoline; +/* Indicates some modules requested the task finder to notify sym.c + _stp_sym_init () should track vma maps. */ +static char _stp_need_vma_tracker; + static unsigned long _stp_module_relocate (const char *module, const char *section, unsigned long offset); static struct _stp_module *_stp_get_unwind_info (unsigned long addr); |