summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2015-07-05 11:42:01 +0000
committerandrew <andrew@FreeBSD.org>2015-07-05 11:42:01 +0000
commit025a2146d6bbb52dc0326907f80382b6ae77c290 (patch)
treebbda77dd803987ee9179264391be5040e934d373 /libexec
parent68ef3a03c55b4bc994af59f5b719158c1c6e095d (diff)
downloadFreeBSD-src-025a2146d6bbb52dc0326907f80382b6ae77c290.zip
FreeBSD-src-025a2146d6bbb52dc0326907f80382b6ae77c290.tar.gz
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
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rtld-elf/aarch64/reloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libexec/rtld-elf/aarch64/reloc.c b/libexec/rtld-elf/aarch64/reloc.c
index b515a1e..4c8556b 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:
/*
OpenPOWER on IntegriCloud