diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2008-07-04 18:01:26 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2008-07-04 18:01:26 -0400 |
commit | ad9ffc6f83dc5b1954c7e4e78cb57b7a3d005281 (patch) | |
tree | b65afc4d935b517651a4db68cc8b2b9b08243da2 /runtime/sym.c | |
parent | 53f7dd30e87fa480c5d43ce2a1312ce27a4372c9 (diff) | |
download | systemtap-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.c | 4 |
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; |