aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-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/elf32-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/elf32-ppc.h')
-rw-r--r--bfd/elf32-ppc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/bfd/elf32-ppc.h b/bfd/elf32-ppc.h
index 265859b..fa860f1 100644
--- a/bfd/elf32-ppc.h
+++ b/bfd/elf32-ppc.h
@@ -60,6 +60,7 @@ struct ppc_elf_params
void ppc_elf_link_params (struct bfd_link_info *, struct ppc_elf_params *);
int ppc_elf_select_plt_layout (bfd *, struct bfd_link_info *);
+bfd_boolean ppc_elf_inline_plt (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 *);