aboutsummaryrefslogtreecommitdiff
path: root/gold/options.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-06-23 20:39:43 +0930
committerAlan Modra <amodra@gmail.com>2017-06-23 20:39:43 +0930
commit7ee7ff7015840f2d0156bf386a050bd728d22fc4 (patch)
tree3e12dac4d7ecf1c5df4748be3365e140a8058e5a /gold/options.h
parent7e57d19e48f94ff9a19a9413cf25d1887e3a7f52 (diff)
downloadgdb-7ee7ff7015840f2d0156bf386a050bd728d22fc4.zip
gdb-7ee7ff7015840f2d0156bf386a050bd728d22fc4.tar.gz
gdb-7ee7ff7015840f2d0156bf386a050bd728d22fc4.tar.bz2
[GOLD] PowerPC64 localentry:0 plt call optimization
elfcpp/ * elfcpp.h (DT_PPC64_OPT): Define. * powerpc.h (PPC64_OPT_TLS, PPC64_OPT_MULTI_TOC, PPC64_OPT_LOCALENTRY): Define. gold/ * options.h (General_options): Add plt_localentry. * powerpc.cc (Target_powerpc::st_other): New function. (Target_powerpc::plt_localentry0_, plt_localentry0_init_, has_localentry0_): New vars. (Target_powerpc::plt_localentry0, set_has_localentry0, is_elfv2_localentry0): New functions. (Target_powerpc::Branch_info::mark_pltcall): Don't set tocsave or return true for localentry:0 calls. (Stub_table::Plt_stub_ent::localentry0_): New var. (Stub_table::add_plt_call_entry): Set localentry0_ and has_localentry0_. Don't set r2save_ for localentry:0 calls. (Output_data_glink::do_write): Save r2 in __glink_PLTresolve for elfv2. (Target_powerpc::scan_relocs): Default plt_localentry0_. (Target_powerpc::do_finalize_sections): Set DT_PPC64_OPT. (Target_powerpc::Relocate::relocate): Don't require nop following calls for localentry:0 plt calls, and don't change nop.
Diffstat (limited to 'gold/options.h')
-rw-r--r--gold/options.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gold/options.h b/gold/options.h
index 202d4b0..c7c032b 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -1104,6 +1104,10 @@ class General_options
N_("(PowerPC64 only) Align PLT call stubs to fit cache lines"),
N_("[=P2ALIGN]"), true, int, int, options::parse_uint, false);
+ DEFINE_bool(plt_localentry, options::TWO_DASHES, '\0', false,
+ N_("(PowerPC64 only) Optimize calls to ELFv2 localentry:0 functions"),
+ N_("(PowerPC64 only) Don't optimize ELFv2 calls"));
+
DEFINE_bool(plt_static_chain, options::TWO_DASHES, '\0', false,
N_("(PowerPC64 only) PLT call stubs should load r11"),
N_("(PowerPC64 only) PLT call stubs should not load r11"));