summaryrefslogtreecommitdiffstats
path: root/linker
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2009-10-16 12:46:51 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2009-10-16 12:46:51 -0700
commit5d436ddcae640e2b2af30a5654bec33273b7a9c3 (patch)
tree790abda1151b91710b6ae7d85396055854cae337 /linker
parentb63e4e88b0d13afa431864190b3515a549c16d85 (diff)
parent8213d5c3c072b23f5cc1922d232efe7338091d9b (diff)
downloadbionic-5d436ddcae640e2b2af30a5654bec33273b7a9c3.zip
bionic-5d436ddcae640e2b2af30a5654bec33273b7a9c3.tar.gz
bionic-5d436ddcae640e2b2af30a5654bec33273b7a9c3.tar.bz2
am 8213d5c3: am ff7b46b8: Merge change I3c998761 into eclair
Merge commit '8213d5c3c072b23f5cc1922d232efe7338091d9b' into eclair-mr2-plus-aosp * commit '8213d5c3c072b23f5cc1922d232efe7338091d9b': Allow the dynamic linker to relocate references to thumb symbols in NDK libraries.
Diffstat (limited to 'linker')
-rw-r--r--linker/linker.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/linker/linker.c b/linker/linker.c
index 7a1e9a4..9e28b13 100644
--- a/linker/linker.c
+++ b/linker/linker.c
@@ -1241,9 +1241,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;
}