summaryrefslogtreecommitdiff
path: root/bfd/elf32-ppc.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-04-09 09:21:59 +0930
committerAlan Modra <amodra@gmail.com>2018-04-09 17:02:19 +0930
commit49c09209d06885dc8350042ce77e442bfbb5bf27 (patch)
tree8acffc57915285f2c28394f16c3bfa1a7bf075f6 /bfd/elf32-ppc.h
parent08be322439408ac02cff2ac9b5eca4f7243a0277 (diff)
downloadbinutils-gdb-49c09209d06885dc8350042ce77e442bfbb5bf27.tar.gz
Rearrange PLT reloc output on powerpc
The current scheme where we output PLT relocs for global symbols in finish_dynamic_symbol, and PLT relocs for local symbols when outputting stubs does not work if PLT entries are to be used for inline PLT sequences against non-dynamic globals or local symbols. bfd/ * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs for local symbols to.. (write_plt_relocs_for_local_syms): ..here. New function. (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for global symbols to.. (build_global_entry_stubs_and_plt): ..here. Rename from build_global_entry_stubs. (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt. Call write_plt_relocs_for_local_syms. * elf32-ppc.c (get_sym_h): New function. (ppc_elf_relax_section): Use get_sym_h. (ppc_elf_relocate_section): Move output of PLT relocs and glink stubs for local symbols to.. (ppc_finish_symbols): ..here. New function. (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for global syms to.. (write_global_sym_plt): ..here. New function. * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute. (ppc_finish_symbols): Declare. ld/ * ppc32elf.em (ppc_finish): Call ppc_finish_symbols.
Diffstat (limited to 'bfd/elf32-ppc.h')
-rw-r--r--bfd/elf32-ppc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/elf32-ppc.h b/bfd/elf32-ppc.h
index f56d027bf69..265859bcc13 100644
--- a/bfd/elf32-ppc.h
+++ b/bfd/elf32-ppc.h
@@ -63,6 +63,6 @@ int ppc_elf_select_plt_layout (bfd *, struct bfd_link_info *);
asection *ppc_elf_tls_setup (bfd *, struct bfd_link_info *);
bfd_boolean ppc_elf_tls_optimize (bfd *, struct bfd_link_info *);
void ppc_elf_maybe_strip_sdata_syms (struct bfd_link_info *);
-extern bfd_boolean ppc_elf_modify_segment_map (bfd *,
- struct bfd_link_info * ATTRIBUTE_UNUSED);
+extern bfd_boolean ppc_elf_modify_segment_map (bfd *, struct bfd_link_info *);
extern bfd_boolean ppc_elf_section_processing (bfd *, Elf_Internal_Shdr *);
+extern bfd_boolean ppc_finish_symbols (struct bfd_link_info *);