summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2018-04-19 18:58:07 +0300
committerJari Vetoniemi <mailroxas@gmail.com>2018-04-19 18:58:07 +0300
commit6546065147601709d2bd885448249327a5af3539 (patch)
treed87a8f438e9ed7682b4bf019cedad24169971445
parent51d3ed79ed63d524374f2c7f0f47687491c93503 (diff)
linker: better sym == function detection
-rw-r--r--src/linker/linker.c2
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) {