am fe62de1a: Add support for R_ARM_REL32 to the dynamic linker.

Merge commit 'fe62de1ad036a1417df44b7b1a7c65cc79dc7091' into eclair-plus-aosp

* commit 'fe62de1ad036a1417df44b7b1a7c65cc79dc7091':
  Add support for R_ARM_REL32 to the dynamic linker.
This commit is contained in:
David 'Digit' Turner 2009-12-02 11:17:29 -08:00 committed by Android Git Automerger
commit a3de55c831
2 changed files with 14 additions and 6 deletions

View File

@ -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);

View File

@ -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);