aboutsummaryrefslogtreecommitdiffstats
path: root/linker
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2009-11-17 16:06:26 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2009-11-17 16:06:26 -0800
commitebf3ea006e5367fff93d2491eec24c4b1a633805 (patch)
treee7e84eed54db64bd5a48b153f0c5174583782230 /linker
parenta7f8f312e0791509b2382f90861fe9f373bd4f0b (diff)
parent34ea5117dbeba41ae5dfdfb2c2ec8cae23388b66 (diff)
downloadandroid_bionic-ebf3ea006e5367fff93d2491eec24c4b1a633805.tar.gz
android_bionic-ebf3ea006e5367fff93d2491eec24c4b1a633805.tar.bz2
android_bionic-ebf3ea006e5367fff93d2491eec24c4b1a633805.zip
am 34ea5117: Add support for R_ARM_REL32 to the dynamic linker.
Merge commit '34ea5117dbeba41ae5dfdfb2c2ec8cae23388b66' into eclair-mr2-plus-aosp * commit '34ea5117dbeba41ae5dfdfb2c2ec8cae23388b66': Add support for R_ARM_REL32 to the dynamic linker.
Diffstat (limited to 'linker')
-rw-r--r--linker/linker.c7
-rw-r--r--linker/linker.h13
2 files changed, 14 insertions, 6 deletions
diff --git a/linker/linker.c b/linker/linker.c
index 9779290c2..6d57cbc2c 100644
--- a/linker/linker.c
+++ b/linker/linker.c
@@ -1295,6 +1295,13 @@ static int reloc_library(soinfo *si, Elf32_Rel *rel, unsigned count)
reloc, sym_addr, sym_name);
*((unsigned*)reloc) += sym_addr;
break;
+ case R_ARM_REL32:
+ COUNT_RELOC(RELOC_RELATIVE);
+ MARK(rel->r_offset);
+ TRACE_TYPE(RELO, "%5d RELO REL32 %08x <- %08x - %08x %s\n", pid,
+ reloc, sym_addr, rel->r_offset, sym_name);
+ *((unsigned*)reloc) += sym_addr - rel->r_offset;
+ break;
#elif defined(ANDROID_X86_LINKER)
case R_386_JUMP_SLOT:
COUNT_RELOC(RELOC_ABSOLUTE);
diff --git a/linker/linker.h b/linker/linker.h
index 2e513380e..ec014890d 100644
--- a/linker/linker.h
+++ b/linker/linker.h
@@ -172,6 +172,13 @@ extern soinfo libdl_info;
#define R_ARM_JUMP_SLOT 22
#define R_ARM_RELATIVE 23
+/* According to the AAPCS specification, we only
+ * need the above relocations. However, in practice,
+ * the following ones turn up from time to time.
+ */
+#define R_ARM_ABS32 2
+#define R_ARM_REL32 3
+
#elif defined(ANDROID_X86_LINKER)
#define R_386_32 1
@@ -214,12 +221,6 @@ extern soinfo libdl_info;
#define DT_PREINIT_ARRAYSZ 33
#endif
-/* in theory we only need the above relative relocations,
- but in practice the following one turns up from time
- to time. fushigi na.
-*/
-#define R_ARM_ABS32 2
-
soinfo *find_library(const char *name);
unsigned unload_library(soinfo *si);
Elf32_Sym *lookup_in_library(soinfo *si, const char *name);