From ad9ffc6f83dc5b1954c7e4e78cb57b7a3d005281 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Fri, 4 Jul 2008 18:01:26 -0400 Subject: avoid appearing to succeed in stp_relocation() of a symbol for a module that is not known to be loaded --- runtime/sym.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'runtime/sym.c') 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; -- cgit