diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-04-19 15:16:05 +0300 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-04-19 15:16:05 +0300 |
commit | f2c5d2cf28d92c77a729054d12053f433fad9e1c (patch) | |
tree | 19a90ff01ddd24354c55271319f8a5724c9481e7 /src/linker | |
parent | d194dfe969ca5fb5d405fad102b58c114ee83b9b (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.c | 4 |
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 |