aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-04-09 09:32:39 +0930
committerAlan Modra <amodra@gmail.com>2018-04-09 17:40:54 +0930
commit3e04d7655bf63f4e5a0d0354c21aa3fa2ece3681 (patch)
treec79cf2877a3db9fcf0c1aa2cd21bd963da6b7c96 /bfd/elf64-ppc.h
parent23cedd1dc90d05c4b80d4a4b000ed5f37b9c3268 (diff)
downloadgdb-3e04d7655bf63f4e5a0d0354c21aa3fa2ece3681.zip
gdb-3e04d7655bf63f4e5a0d0354c21aa3fa2ece3681.tar.gz
gdb-3e04d7655bf63f4e5a0d0354c21aa3fa2ece3681.tar.bz2
Inline PLT call optimization
This patch adds the analysis part of PLT call optimization, enabling the code added with the previous patch that actually performs the optimization. Gold support is not available yet. bfd/ * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field. (struct ppc_link_hash_table): Add can_convert_all_inline_plt. (ppc64_elf_check_relocs): Set has_pltcall. (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries. (ppc64_elf_inline_plt): New function. (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals. * elf64-ppc.h (ppc64_elf_inline_plt): Declare. * elf32-ppc.c (has_pltcall): Define. (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt. (ppc_elf_check_relocs): Set has_pltcall. (ppc_elf_inline_plt): New function. (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries. (ppc_elf_size_dynamic_sections): Likewise. * elf32-ppc.h (ppc_elf_inline_plt): Declare. ld/ * emultempl/ppc64elf.em (no_inline_plt): New var. (ppc_before_allocation): Call ppc64_elf_inline_plt. (enum ppc64_opt): Add OPTION_NO_INLINE_OPT. (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Handle --no-inline-optimize. * emultemps/ppc32elf.em (no_inline_opt): New var. (prelim_size_sections): New function, extracted from.. (ppc_before_allocation): ..here. Call ppc_elf_inline_plt. (enum ppc32_opt): Add OPTION_NO_INLINE_OPT. (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Handle --no-inline-optimize.
Diffstat (limited to 'bfd/elf64-ppc.h')
-rw-r--r--bfd/elf64-ppc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/elf64-ppc.h b/bfd/elf64-ppc.h
index 8fa0140..9d5a85d 100644
--- a/bfd/elf64-ppc.h
+++ b/bfd/elf64-ppc.h
@@ -69,6 +69,8 @@ bfd_boolean ppc64_elf_init_stub_bfd
(struct bfd_link_info *, struct ppc64_elf_params *);
bfd_boolean ppc64_elf_edit_opd
(struct bfd_link_info *);
+bfd_boolean ppc64_elf_inline_plt
+ (struct bfd_link_info *);
asection *ppc64_elf_tls_setup
(struct bfd_link_info *);
bfd_boolean ppc64_elf_tls_optimize