diff options
author | Alan Modra <amodra@gmail.com> | 2017-07-31 19:53:49 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-07-31 19:53:49 +0930 |
commit | aacb3b6dfc7a9162a049dada22f1079809188f02 (patch) | |
tree | 168b902e162823b580f5c3041515e9b2a13d020f /gold/options.h | |
parent | 54387c7fe27848e41a51c1eccc6a24b3d6d3441f (diff) | |
download | gdb-aacb3b6dfc7a9162a049dada22f1079809188f02.zip gdb-aacb3b6dfc7a9162a049dada22f1079809188f02.tar.gz gdb-aacb3b6dfc7a9162a049dada22f1079809188f02.tar.bz2 |
[GOLD] PowerPC --no-tls-optimize
This adds a --no-tls-optimize option for people who want to keep
__tls_get_addr calls in an executable rather than optimizing such code
sequences to IE/LE.
Also tidy some formatting errors, rename a variable to better reflect
its use, and tweak two functions that create pairs of GOT entries to
first check whether the GOT entry already exists before potentially
inserting the header via reserve(2). Without the check it is possible
to waste one GOT entry.
* options.h (no_tls_optimize): New powerpc option.
* powerpc.cc (Target_powerpc::abiversion, set_abiversion): Formatting.
(Target_powerpc::stk_toc): Formatting, fix comment.
(Target_powerpc::Track_tls::tls_get_addr_state): Rename from
tls_get_addr.
(Target_powerpc::optimize_tls_gd, optimize_tls_ld, optimize_tls_ie):
Return TLSOPT_NONE when !tls_optimize.
(Target_powerpc::add_global_pair_with_rel): Check
for existing reloc before reserving.
(Target_powerpc::add_local_tls_pair): Likewise.
Diffstat (limited to 'gold/options.h')
-rw-r--r-- | gold/options.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gold/options.h b/gold/options.h index c7c032b..7be15a5 100644 --- a/gold/options.h +++ b/gold/options.h @@ -1290,6 +1290,10 @@ class General_options DEFINE_uint(thread_count_final, options::TWO_DASHES, '\0', 0, N_("Number of threads to use in final pass"), N_("COUNT")); + DEFINE_bool(tls_optimize, options::TWO_DASHES, '\0', true, + N_("(PowerPC/64 only) Optimize GD/LD/IE code to IE/LE"), + N_("(PowerPC/64 only) Don'\''t try to optimize TLS accesses")); + DEFINE_bool(toc_optimize, options::TWO_DASHES, '\0', true, N_("(PowerPC64 only) Optimize TOC code sequences"), N_("(PowerPC64 only) Don't optimize TOC code sequences")); |