diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-04-19 18:58:07 +0300 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-04-19 18:58:07 +0300 |
commit | 6546065147601709d2bd885448249327a5af3539 (patch) | |
tree | d87a8f438e9ed7682b4bf019cedad24169971445 /src | |
parent | 51d3ed79ed63d524374f2c7f0f47687491c93503 (diff) |
linker: better sym == function detection
Diffstat (limited to 'src')
-rw-r--r-- | src/linker/linker.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/linker/linker.c b/src/linker/linker.c index f91316c..bd774a4 100644 --- a/src/linker/linker.c +++ b/src/linker/linker.c @@ -1392,7 +1392,7 @@ static int apkenv_reloc_library(soinfo *si, Elf32_Rel *rel, unsigned count) { Dl_info info; ElfW(Sym) *extra; - if (dladdr1((void*)sym_addr, &info, (void**) &extra, RTLD_DL_SYMENT) && extra && ELF32_ST_TYPE(extra->st_info) == STT_FUNC) + if (dladdr1((void*)sym_addr, &info, (void**) &extra, RTLD_DL_SYMENT) && (!extra || ELF32_ST_TYPE(extra->st_info) == STT_FUNC)) sym_addr = (unsigned)wrapper_create(sym_name, (void*)sym_addr); } else if(s == NULL) { |