aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Clarke <jrtc27@jrtc27.com>2017-05-13 08:01:15 -0700
committerCary Coutant <ccoutant@gmail.com>2017-05-13 08:29:43 -0700
commit2346a98c797e69d0d10b7935ac8d8772365f2ca2 (patch)
tree517f330031e240f1465a83f18a459e778bafbda8
parentf686917beeb2c79539b234c9ddf77d5fd925918d (diff)
downloadgdb-2346a98c797e69d0d10b7935ac8d8772365f2ca2.zip
gdb-2346a98c797e69d0d10b7935ac8d8772365f2ca2.tar.gz
gdb-2346a98c797e69d0d10b7935ac8d8772365f2ca2.tar.bz2
Fix assertion failure relaxing TLS for position-independent executables.
gold/ PR gold/21444 * gold.cc (Target_sparc::Relocate::relocate_tls): Local variables are final for position-independent executables. This has to be consistent with Target_sparc::Scan::local otherwise they will disagree as to whether local-exec is used.
-rw-r--r--gold/ChangeLog8
-rw-r--r--gold/sparc.cc2
2 files changed, 9 insertions, 1 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index d598386..eaf30d3 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,11 @@
+2017-05-13 James Clarke <jrtc27@jrtc27.com>
+
+ PR gold/21444
+ * gold.cc (Target_sparc::Relocate::relocate_tls): Local
+ variables are final for position-independent executables. This
+ has to be consistent with Target_sparc::Scan::local otherwise
+ they will disagree as to whether local-exec is used.
+
2017-02-22 Alan Modra <amodra@gmail.com>
* powerpc.cc (Target_powerpc::make_iplt_section): Check that
diff --git a/gold/sparc.cc b/gold/sparc.cc
index a9cb93a..54c7c33 100644
--- a/gold/sparc.cc
+++ b/gold/sparc.cc
@@ -3730,7 +3730,7 @@ Target_sparc<size, big_endian>::Relocate::relocate_tls(
const bool is_final =
(gsym == NULL
- ? !parameters->options().output_is_position_independent()
+ ? !parameters->options().shared()
: gsym->final_value_is_known());
const tls::Tls_optimization optimized_type
= optimize_tls_reloc(is_final, r_type);