diff options
Diffstat (limited to 'ld/emultempl/ppc64elf.em')
-rw-r--r-- | ld/emultempl/ppc64elf.em | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em index 62c298c..60bc8bd 100644 --- a/ld/emultempl/ppc64elf.em +++ b/ld/emultempl/ppc64elf.em @@ -55,6 +55,9 @@ static int no_tls_opt = 0; /* Whether to run opd optimization. */ static int no_opd_opt = 0; +/* Whether to convert inline PLT calls to direct. */ +static int no_inline_opt = 0; + /* Whether to run toc optimization. */ static int no_toc_opt = 0; @@ -282,6 +285,15 @@ ppc_before_allocation (void) && !ppc64_elf_edit_opd (&link_info)) einfo (_("%X%P: can not edit %s: %E\n"), "opd"); + if (!no_inline_opt + && !bfd_link_relocatable (&link_info)) + { + prelim_size_sections (); + + if (!ppc64_elf_inline_plt (&link_info)) + einfo (_("%X%P: inline PLT: %E\n")); + } + if (ppc64_elf_tls_setup (&link_info) && !no_tls_opt) { @@ -706,6 +718,7 @@ enum ppc64_opt OPTION_TLS_GET_ADDR_OPT, OPTION_NO_TLS_GET_ADDR_OPT, OPTION_NO_OPD_OPT, + OPTION_NO_INLINE_OPT, OPTION_NO_TOC_OPT, OPTION_NO_MULTI_TOC, OPTION_NO_TOC_SORT, @@ -733,6 +746,7 @@ PARSE_AND_LIST_LONGOPTS=${PARSE_AND_LIST_LONGOPTS}' { "tls-get-addr-optimize", no_argument, NULL, OPTION_TLS_GET_ADDR_OPT }, { "no-tls-get-addr-optimize", no_argument, NULL, OPTION_NO_TLS_GET_ADDR_OPT }, { "no-opd-optimize", no_argument, NULL, OPTION_NO_OPD_OPT }, + { "no-inline-optimize", no_argument, NULL, OPTION_NO_INLINE_OPT }, { "no-toc-optimize", no_argument, NULL, OPTION_NO_TOC_OPT }, { "no-multi-toc", no_argument, NULL, OPTION_NO_MULTI_TOC }, { "no-toc-sort", no_argument, NULL, OPTION_NO_TOC_SORT }, @@ -810,6 +824,9 @@ PARSE_AND_LIST_OPTIONS=${PARSE_AND_LIST_OPTIONS}' --no-opd-optimize Don'\''t optimize the OPD section\n" )); fprintf (file, _("\ + --no-inline-optimize Don'\''t convert inline PLT to direct calls\n" + )); + fprintf (file, _("\ --no-toc-optimize Don'\''t optimize the TOC section\n" )); fprintf (file, _("\ @@ -915,6 +932,10 @@ PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LIST_ARGS_CASES}' no_opd_opt = 1; break; + case OPTION_NO_INLINE_OPT: + no_inline_opt = 1; + break; + case OPTION_NO_TOC_OPT: no_toc_opt = 1; break; |