From 6546065147601709d2bd885448249327a5af3539 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Thu, 19 Apr 2018 18:58:07 +0300 Subject: linker: better sym == function detection --- src/linker/linker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/linker') 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) { -- cgit v1.2.3-70-g09d2