summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-11-25 14:58:50 -0500
committerDave Brolley <brolley@redhat.com>2009-11-25 14:58:50 -0500
commita367e8991d2faf7d803b79309f80943339b0c284 (patch)
tree57da85463473069f7c029adc2837545e92486b01 /runtime
parent721e5826eebac2a3c781b339d2203eea418d7a21 (diff)
parentaa8c86d6eb940dc06d90a926a262070dd400f9ad (diff)
downloadsystemtap-steved-a367e8991d2faf7d803b79309f80943339b0c284.tar.gz
systemtap-steved-a367e8991d2faf7d803b79309f80943339b0c284.tar.xz
systemtap-steved-a367e8991d2faf7d803b79309f80943339b0c284.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'runtime')
-rw-r--r--runtime/staprun/staprun_funcs.c2
-rw-r--r--runtime/sym.c21
2 files changed, 15 insertions, 8 deletions
diff --git a/runtime/staprun/staprun_funcs.c b/runtime/staprun/staprun_funcs.c
index 36496fb7..75d56b50 100644
--- a/runtime/staprun/staprun_funcs.c
+++ b/runtime/staprun/staprun_funcs.c
@@ -12,9 +12,7 @@
#include "config.h"
#include "staprun.h"
-#if HAVE_NSS
#include "modverify.h"
-#endif
#include <sys/mount.h>
#include <sys/utsname.h>
diff --git a/runtime/sym.c b/runtime/sym.c
index fd9863dd..953161bc 100644
--- a/runtime/sym.c
+++ b/runtime/sym.c
@@ -35,7 +35,9 @@ static int _stp_tf_mmap_cb(struct stap_task_finder_target *tgt,
"mmap_cb: tsk %d:%d path %s, addr 0x%08lx, length 0x%08lx, offset 0x%lx, flags 0x%lx\n",
tsk->pid, tsk->tgid, path, addr, length, offset, vm_flags);
#endif
- if (path != NULL) {
+ // We are only interested in the first load of the whole module that
+ // is executable. But see below for the comment about PR11015.
+ if (path != NULL && offset == 0 && (vm_flags & VM_EXEC)) {
for (i = 0; i < _stp_num_modules; i++) {
if (strcmp(path, _stp_modules[i]->path) == 0)
{
@@ -56,11 +58,18 @@ static int _stp_tf_mmap_cb(struct stap_task_finder_target *tgt,
// 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;
+ // contain multiple elf sections). PR11015.
+ if (strcmp(".dynamic",
+ module->sections[0].name) == 0)
+ {
+ if (module->sections[0].addr == 0)
+ module->sections[0].addr = addr;
+ else if (module->sections[0].addr != addr)
+ _stp_error ("Reloaded module '%s'"
+ " at 0x%lx, was 0x%lx\n",
+ path, addr,
+ module->sections[0].addr);
+ }
break;
}
}