summaryrefslogtreecommitdiffstats
path: root/runtime/sym.c
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-07-04 18:01:26 -0400
committerFrank Ch. Eigler <fche@elastic.org>2008-07-04 18:01:26 -0400
commitad9ffc6f83dc5b1954c7e4e78cb57b7a3d005281 (patch)
treeb65afc4d935b517651a4db68cc8b2b9b08243da2 /runtime/sym.c
parent53f7dd30e87fa480c5d43ce2a1312ce27a4372c9 (diff)
downloadsystemtap-steved-ad9ffc6f83dc5b1954c7e4e78cb57b7a3d005281.tar.gz
systemtap-steved-ad9ffc6f83dc5b1954c7e4e78cb57b7a3d005281.tar.xz
systemtap-steved-ad9ffc6f83dc5b1954c7e4e78cb57b7a3d005281.zip
avoid appearing to succeed in stp_relocation() of a symbol for a module that is not known to be loaded
Diffstat (limited to 'runtime/sym.c')
-rw-r--r--runtime/sym.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/sym.c b/runtime/sym.c
index ab6b6069..178c6219 100644
--- a/runtime/sym.c
+++ b/runtime/sym.c
@@ -56,6 +56,10 @@ unsigned long _stp_module_relocate(const char *module, const char *section, unsi
for (j = 0; j < last->num_sections; j++) {
last_sec = &last->sections[j];
if (!strcmp(section, last_sec->symbol)) {
+
+ if (last_sec->addr == 0) /* module/section not in memory */
+ continue;
+
offset += last_sec->addr;
dbug_sym(1, "address=%lx\n", offset);
return offset;