diff options
author | Dima Zavin <dima@android.com> | 2009-05-12 10:59:09 -0700 |
---|---|---|
committer | Dima Zavin <dima@android.com> | 2009-05-12 10:59:09 -0700 |
commit | d1b40d8c69dfca94185ea9231f6cb16f70c02e39 (patch) | |
tree | 51044c6b31d8fc43a588c5350ca966d3bccf4ba7 | |
parent | 5e563700380eade647f347669ea61dbb0ede9814 (diff) | |
download | bionic-d1b40d8c69dfca94185ea9231f6cb16f70c02e39.zip bionic-d1b40d8c69dfca94185ea9231f6cb16f70c02e39.tar.gz bionic-d1b40d8c69dfca94185ea9231f6cb16f70c02e39.tar.bz2 |
linker: Compute symbol name before lookup so we can also use it for error msg
Signed-off-by: Dima Zavin <dima@android.com>
-rw-r--r-- | linker/linker.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linker/linker.c b/linker/linker.c index 63e04c7..bb3b8e7 100644 --- a/linker/linker.c +++ b/linker/linker.c @@ -1121,7 +1121,8 @@ static int reloc_library(soinfo *si, Elf32_Rel *rel, unsigned count) DEBUG("%5d Processing '%s' relocation at index %d\n", pid, si->name, idx); if(sym != 0) { - s = _do_lookup(si, strtab + symtab[sym].st_name, &base); + sym_name = (char *)(strtab + symtab[sym].st_name); + s = _do_lookup(si, sym_name, &base); if(s == 0) { ERROR("%5d cannot locate '%s'...\n", pid, sym_name); return -1; @@ -1141,7 +1142,6 @@ static int reloc_library(soinfo *si, Elf32_Rel *rel, unsigned count) return -1; } sym_addr = (unsigned)(s->st_value + base); - sym_name = (char *)(strtab + symtab[sym].st_name); COUNT_RELOC(RELOC_SYMBOL); } else { s = 0; |