summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2003-12-12 01:12:41 +0000
committerpeter <peter@FreeBSD.org>2003-12-12 01:12:41 +0000
commitf9016d0ffd1f176464212f0743ea398890b6b18f (patch)
treeb35be1c1ec2cccc45925526ef57b48cfe4aa1610 /libexec
parent27c6ad83ce38767ff5b37e655cdbb8676c411c0e (diff)
downloadFreeBSD-src-f9016d0ffd1f176464212f0743ea398890b6b18f.zip
FreeBSD-src-f9016d0ffd1f176464212f0743ea398890b6b18f.tar.gz
Fix dynamic linking a bit more.. enough that mozilla-firebird works if you
dig up the patches for amd64 support for it. Note to self: do not put a 64 bit value in a 32 bit space.
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 fa735f4..dcb492c 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 */
OpenPOWER on IntegriCloud