aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2003-12-12 01:12:41 +0000
committerPeter Wemm <peter@FreeBSD.org>2003-12-12 01:12:41 +0000
commit6143d8ba5fee01ff5c6297ae27377ead5e79b123 (patch)
treeb35be1c1ec2cccc45925526ef57b48cfe4aa1610 /libexec
parentda1ddac9f416fe880c50110b1fd5d80d1de2e358 (diff)
Notes
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rtld-elf/amd64/reloc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libexec/rtld-elf/amd64/reloc.c b/libexec/rtld-elf/amd64/reloc.c
index fa735f499aaaf..dcb492c22d42f 100644
--- a/libexec/rtld-elf/amd64/reloc.c
+++ b/libexec/rtld-elf/amd64/reloc.c
@@ -129,6 +129,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld)
relalim = (const Elf_Rela *) ((caddr_t) obj->rela + obj->relasize);
for (rela = obj->rela; rela < relalim; rela++) {
Elf_Addr *where = (Elf_Addr *) (obj->relocbase + rela->r_offset);
+ Elf32_Addr *where32 = (Elf32_Addr *)where;
switch (ELF_R_TYPE(rela->r_info)) {
@@ -164,9 +165,8 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld)
if (def == NULL)
goto done;
- *where =
- (Elf_Addr) (defobj->relocbase + def->st_value + rela->r_addend) -
- (Elf_Addr) where;
+ *where32 = (Elf32_Addr) (unsigned long) (defobj->relocbase +
+ def->st_value + rela->r_addend - (Elf_Addr) where);
}
break;
/* missing: R_X86_64_GOT32 R_X86_64_PLT32 */