From 3cf00397ad0b06568b3a8cbec455f95ecea36cb1 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Sun, 5 Jul 2015 11:42:01 +0000 Subject: [PATCH] Add on the addend when in the R_AARCH64_ABS64 and R_AARCH64_GLOB_DAT cases. This fixes at least sshd, and some of the boehm-gc tests. Sponsored by: ABT Systems Ltd --- libexec/rtld-elf/aarch64/reloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libexec/rtld-elf/aarch64/reloc.c b/libexec/rtld-elf/aarch64/reloc.c index b515a1e9625f..4c8556b65732 100644 --- a/libexec/rtld-elf/aarch64/reloc.c +++ b/libexec/rtld-elf/aarch64/reloc.c @@ -341,7 +341,8 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, if (def == NULL) return (-1); - *where = (Elf_Addr)defobj->relocbase + def->st_value; + *where = (Elf_Addr)defobj->relocbase + def->st_value + + rela->r_addend; break; case R_AARCH64_COPY: /*