diff options
-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; |