diff options
Diffstat (limited to 'sysdeps/powerpc')
-rw-r--r-- | sysdeps/powerpc/powerpc32/dl-machine.h | 31 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/dl-machine.h | 37 |
2 files changed, 11 insertions, 57 deletions
diff --git a/sysdeps/powerpc/powerpc32/dl-machine.h b/sysdeps/powerpc/powerpc32/dl-machine.h index 70961b4b78..7583b491f9 100644 --- a/sysdeps/powerpc/powerpc32/dl-machine.h +++ b/sysdeps/powerpc/powerpc32/dl-machine.h @@ -294,7 +294,6 @@ elf_machine_rela (struct link_map *map, struct r_scope_elem *scope[], const int r_type = ELF32_R_TYPE (reloc->r_info); struct link_map *sym_map = NULL; -#ifndef RESOLVE_CONFLICT_FIND_MAP if (r_type == R_PPC_RELATIVE) { *reloc_addr = map->l_addr + reloc->r_addend; @@ -318,9 +317,6 @@ elf_machine_rela (struct link_map *map, struct r_scope_elem *scope[], value = SYMBOL_ADDRESS (sym_map, sym, true); } value += reloc->r_addend; -#else - value = reloc->r_addend; -#endif if (sym != NULL && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0) @@ -341,12 +337,11 @@ elf_machine_rela (struct link_map *map, struct r_scope_elem *scope[], *reloc_addr = value; break; -#ifndef RESOLVE_CONFLICT_FIND_MAP -# ifdef RTLD_BOOTSTRAP -# define NOT_BOOTSTRAP 0 -# else -# define NOT_BOOTSTRAP 1 -# endif +#ifdef RTLD_BOOTSTRAP +# define NOT_BOOTSTRAP 0 +#else +# define NOT_BOOTSTRAP 1 +#endif case R_PPC_DTPMOD32: if (map->l_info[DT_PPC(OPT)] @@ -361,11 +356,11 @@ elf_machine_rela (struct link_map *map, struct r_scope_elem *scope[], } else if (sym_map != NULL) { -# ifndef SHARED +#ifndef SHARED CHECK_STATIC_TLS (map, sym_map); -# else +#else if (TRY_STATIC_TLS (map, sym_map)) -# endif +#endif { reloc_addr[0] = 0; /* Set up for local dynamic. */ @@ -395,11 +390,11 @@ elf_machine_rela (struct link_map *map, struct r_scope_elem *scope[], else if (sym_map != NULL) { /* This reloc is always preceded by R_PPC_DTPMOD32. */ -# ifndef SHARED +#ifndef SHARED assert (HAVE_STATIC_TLS (map, sym_map)); -# else +#else if (HAVE_STATIC_TLS (map, sym_map)) -# endif +#endif { *reloc_addr = TLS_TPREL_VALUE (sym_map, sym, reloc); break; @@ -419,12 +414,8 @@ elf_machine_rela (struct link_map *map, struct r_scope_elem *scope[], *reloc_addr = TLS_TPREL_VALUE (sym_map, sym, reloc); } break; -#endif case R_PPC_JMP_SLOT: -#ifdef RESOLVE_CONFLICT_FIND_MAP - RESOLVE_CONFLICT_FIND_MAP (map, reloc_addr); -#endif if (map->l_info[DT_PPC(GOT)] != 0) { *reloc_addr = value; diff --git a/sysdeps/powerpc/powerpc64/dl-machine.h b/sysdeps/powerpc/powerpc64/dl-machine.h index a505998351..5da5de7a0a 100644 --- a/sysdeps/powerpc/powerpc64/dl-machine.h +++ b/sysdeps/powerpc/powerpc64/dl-machine.h @@ -537,36 +537,6 @@ elf_machine_fixup_plt (struct link_map *map, lookup_t sym_map, return finaladdr; } -static inline void __attribute__ ((always_inline)) -elf_machine_plt_conflict (struct link_map *map, lookup_t sym_map, - const ElfW(Sym) *refsym, const ElfW(Sym) *sym, - const Elf64_Rela *reloc, - Elf64_Addr *reloc_addr, Elf64_Addr finaladdr) -{ -#if _CALL_ELF != 2 - Elf64_FuncDesc *plt = (Elf64_FuncDesc *) reloc_addr; - Elf64_FuncDesc *rel = (Elf64_FuncDesc *) finaladdr; - Elf64_FuncDesc zero_fd = {0, 0, 0}; - - if (sym_map == NULL) - finaladdr = 0; - - if (finaladdr == 0) - rel = &zero_fd; - - plt->fd_func = rel->fd_func; - plt->fd_aux = rel->fd_aux; - plt->fd_toc = rel->fd_toc; - PPC_DCBST (&plt->fd_func); - PPC_DCBST (&plt->fd_aux); - PPC_DCBST (&plt->fd_toc); - PPC_SYNC; -#else - finaladdr += ppc64_local_entry_offset (map, sym_map, refsym, sym); - *reloc_addr = finaladdr; -#endif -} - /* Return the final value of a plt relocation. */ static inline Elf64_Addr elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc, @@ -639,7 +609,6 @@ resolve_ifunc (Elf64_Addr value, const struct link_map *map, const struct link_map *sym_map) { #if _CALL_ELF != 2 -#ifndef RESOLVE_CONFLICT_FIND_MAP /* The function we are calling may not yet have its opd entry relocated. */ Elf64_FuncDesc opd; if (map != sym_map @@ -658,7 +627,6 @@ resolve_ifunc (Elf64_Addr value, asm ("" : "=r" (value) : "0" (&opd), "X" (opd)); } #endif -#endif return ((Elf64_Addr (*) (unsigned long int)) value) (GLRO(dl_hwcap)); } @@ -722,13 +690,8 @@ elf_machine_rela (struct link_map *map, struct r_scope_elem *scope[], value = resolve_ifunc (value, map, sym_map); /* Fall thru */ case R_PPC64_JMP_SLOT: -#ifdef RESOLVE_CONFLICT_FIND_MAP - elf_machine_plt_conflict (map, sym_map, refsym, sym, - reloc, reloc_addr, value); -#else elf_machine_fixup_plt (map, sym_map, refsym, sym, reloc, reloc_addr, value); -#endif return; case R_PPC64_DTPMOD64: |