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
This commit is contained in:
Andrew Turner 2015-07-05 11:42:01 +00:00
parent 391ad8ceb8
commit 3cf00397ad
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=285159

View File

@ -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:
/*