From 5222466d89bf6de3acb4cadbe62c2ebf2edc8d36 Mon Sep 17 00:00:00 2001 From: marcel Date: Thu, 17 Feb 2011 19:31:21 +0000 Subject: Fix the R_ARM_ABS32 relocation implementation. The memory address contains the addend that we need to include. Obtained from: Juniper Networks. Fixed by: Santhanakrishnan Balraj --- sys/arm/arm/elf_machdep.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sys/arm') diff --git a/sys/arm/arm/elf_machdep.c b/sys/arm/arm/elf_machdep.c index e77a542..fcc332c 100644 --- a/sys/arm/arm/elf_machdep.c +++ b/sys/arm/arm/elf_machdep.c @@ -169,9 +169,7 @@ elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, addr = lookup(lf, symidx, 1); if (addr == 0) return -1; - if (*where != addr) - *where = addr; - + *where += addr; break; case R_ARM_COPY: /* none */ -- cgit v1.1