diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-10-16 15:27:36 -0400 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-10-16 15:27:36 -0400 |
commit | ff7b46b87c4d85881d88c2105a94be6c6accb628 (patch) | |
tree | 159137e428186d62f6f55f8bc0f6cf4c99248b3d | |
parent | 5c32826841460294cfba98ff713b4804512bacd1 (diff) | |
parent | 3c99876116356cae09231189f09e5a679fd0d2fd (diff) | |
download | bionic-ff7b46b87c4d85881d88c2105a94be6c6accb628.zip bionic-ff7b46b87c4d85881d88c2105a94be6c6accb628.tar.gz bionic-ff7b46b87c4d85881d88c2105a94be6c6accb628.tar.bz2 |
Merge change I3c998761 into eclair
* changes:
Allow the dynamic linker to relocate references to thumb symbols in NDK libraries.
-rw-r--r-- | linker/linker.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/linker/linker.c b/linker/linker.c index 26cd0a8..a6ecd1a 100644 --- a/linker/linker.c +++ b/linker/linker.c @@ -1240,9 +1240,13 @@ static int reloc_library(soinfo *si, Elf32_Rel *rel, unsigned count) return -1; } #endif - if ((s->st_shndx == SHN_UNDEF) && (s->st_value != 0)) { - DL_ERR("%5d In '%s', shndx=%d && value=0x%08x. We do not " - "handle this yet", pid, si->name, s->st_shndx, + // st_shndx==SHN_UNDEF means an undefined symbol. + // st_value should be 0 then, except that the low bit of st_value is + // used to indicate whether the symbol points to an ARM or thumb function, + // and should be ignored in the following check. + if ((s->st_shndx == SHN_UNDEF) && ((s->st_value & ~1) != 0)) { + DL_ERR("%5d In '%s', symbol=%s shndx=%d && value=0x%08x. We do not " + "handle this yet", pid, si->name, sym_name, s->st_shndx, s->st_value); return -1; } |