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.
This commit is contained in:
Peter Wemm 2003-12-12 01:12:41 +00:00
parent da1ddac9f4
commit 6143d8ba5f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=123481

View File

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