diff options
Diffstat (limited to 'sysdeps/sparc/sparc64')
-rw-r--r-- | sysdeps/sparc/sparc64/dl-machine.h | 15 | ||||
-rw-r--r-- | sysdeps/sparc/sparc64/fpu/fpu_control.h | 4 |
2 files changed, 12 insertions, 7 deletions
diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h index eb46ba92be..e302f4a1fe 100644 --- a/sysdeps/sparc/sparc64/dl-machine.h +++ b/sysdeps/sparc/sparc64/dl-machine.h @@ -220,6 +220,13 @@ elf_machine_lazy_rel (struct link_map *map, const Elf64_Rela *reloc) /* The SPARC overlaps DT_RELA and DT_PLTREL. */ #define ELF_MACHINE_PLTREL_OVERLAP 1 +/* The return value from dl-runtime's fixup, if it should be special. */ +#define ELF_FIXUP_RETURN_VALUE(map, result) \ + ((map)->l_info[DT_SPARC(PLTFMT)] \ + && (map)->l_info[DT_SPARC(PLTFMT)]->d_un.d_val == 2 \ + ? (result) + (map)->l_info[DT_PLTGOT]->d_un.d_ptr + (map)->l_addr \ + : (result)) + /* Set up the loaded object described by L so its unrelocated PLT entries will jump to the on-demand fixup code in dl-runtime.c. */ @@ -232,10 +239,10 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) if (l->l_info[DT_JMPREL] && lazy) { got = (Elf64_Addr *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); - got[1] = (Elf64_Addr) l; /* Identify this shared object. */ /* This function will get called to fix up the GOT entry indicated by the offset on the stack, and then jump to the resolved address. */ - got[2] = (Elf64_Addr) &_dl_runtime_resolve; + got[1] = (Elf64_Addr) &_dl_runtime_resolve; + got[2] = (Elf64_Addr) l; /* Identify this shared object. */ } return lazy; @@ -248,9 +255,9 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) .type _dl_runtime_resolve, @function _dl_runtime_resolve: save %sp, -160, %sp - mov %g5, %o0 + mov %g1, %o0 call fixup - mov %g6, %o1 + mov %g2, %o1 jmp %o0 restore .size _dl_runtime_resolve, .-_dl_runtime_resolve diff --git a/sysdeps/sparc/sparc64/fpu/fpu_control.h b/sysdeps/sparc/sparc64/fpu/fpu_control.h index fd8abb19f1..bedc034eaa 100644 --- a/sysdeps/sparc/sparc64/fpu/fpu_control.h +++ b/sysdeps/sparc/sparc64/fpu/fpu_control.h @@ -41,13 +41,11 @@ /* Now two recommended cw */ -/* Linux default: +/* Linux and IEEE default: - extended precision - rounding to nearest - no exceptions */ #define _FPU_DEFAULT 0x0 - -/* IEEE: same as above */ #define _FPU_IEEE 0x0 /* Type of the control word. */ |