summaryrefslogtreecommitdiff
path: root/src/linker
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2018-04-19 15:16:05 +0300
committerJari Vetoniemi <mailroxas@gmail.com>2018-04-19 15:16:05 +0300
commitf2c5d2cf28d92c77a729054d12053f433fad9e1c (patch)
tree19a90ff01ddd24354c55271319f8a5724c9481e7 /src/linker
parentd194dfe969ca5fb5d405fad102b58c114ee83b9b (diff)
linker/libc: don't wrap variable symbols
This is why the bionic_file_to_glibc_file did not work with just pointers. The input is actually pointer to our wrapper, doh.
Diffstat (limited to 'src/linker')
-rw-r--r--src/linker/linker.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/linker/linker.c b/src/linker/linker.c
index 12a3521..058baa5 100644
--- a/src/linker/linker.c
+++ b/src/linker/linker.c
@@ -1384,7 +1384,9 @@ static int apkenv_reloc_library(soinfo *si, Elf32_Rel *rel, unsigned count)
}
if(sym_addr != 0)
{
- sym_addr = (unsigned)wrapper_create(sym_name, (void*)sym_addr);
+ if(ELF32_ST_TYPE(((Elf32_Sym*)(intptr_t)sym_addr)->st_info) == STT_FUNC) {
+ sym_addr = (unsigned)wrapper_create(sym_name, (void*)sym_addr);
+ }
} else
if(s == NULL) {
/* We only allow an undefined symbol if this is a weak