diff options
author | dfr <dfr@FreeBSD.org> | 2001-10-15 18:48:42 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2001-10-15 18:48:42 +0000 |
commit | 7d69aa453630c63bba640d287d0781db518b5a53 (patch) | |
tree | 58745c0bcc233d2e6a7a5aae303d27432c4dd053 /libexec/rtld-elf/alpha/reloc.c | |
parent | 8d45c0568791bbcc1147afa6e857e7b307c43c11 (diff) | |
download | FreeBSD-src-7d69aa453630c63bba640d287d0781db518b5a53.zip FreeBSD-src-7d69aa453630c63bba640d287d0781db518b5a53.tar.gz |
Add ia64 support. Various adjustments were made to existing targets to
cope with a few interface changes required by the ia64. In particular,
function pointers on ia64 need special treatment in rtld.
Diffstat (limited to 'libexec/rtld-elf/alpha/reloc.c')
-rw-r--r-- | libexec/rtld-elf/alpha/reloc.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/libexec/rtld-elf/alpha/reloc.c b/libexec/rtld-elf/alpha/reloc.c index 823e388..7709589 100644 --- a/libexec/rtld-elf/alpha/reloc.c +++ b/libexec/rtld-elf/alpha/reloc.c @@ -239,7 +239,8 @@ reloc_jmpslots(Obj_Entry *obj) if (def == NULL) return -1; reloc_jmpslot(where, - (Elf_Addr)(defobj->relocbase + def->st_value)); + (Elf_Addr)(defobj->relocbase + def->st_value), + defobj); } } else { const Elf_Rela *relalim; @@ -258,7 +259,8 @@ reloc_jmpslots(Obj_Entry *obj) if (def == NULL) return -1; reloc_jmpslot(where, - (Elf_Addr)(defobj->relocbase + def->st_value)); + (Elf_Addr)(defobj->relocbase + def->st_value), + defobj); } } obj->jmpslots_done = true; @@ -266,8 +268,8 @@ reloc_jmpslots(Obj_Entry *obj) } /* Fixup the jump slot at "where" to transfer control to "target". */ -void -reloc_jmpslot(Elf_Addr *where, Elf_Addr target) +Elf_Addr +reloc_jmpslot(Elf_Addr *where, Elf_Addr target, const Obj_Entry *obj) { Elf_Addr stubaddr; @@ -339,7 +341,7 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr target) */ if ((int32_t)delta != delta) { dbg(" PLT stub too far from GOT to relocate"); - return; + return target; } dhigh = delta - (int16_t)delta; if (dhigh != 0) { @@ -389,6 +391,8 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr target) __asm__ __volatile__("wmb" : : : "memory"); stubptr[0] = inst[0]; } + + return target; } /* Process an R_ALPHA_COPY relocation. */ |