This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] gold: Fix assertion failure relaxing TLS for position-independent executables
- From: James Clarke <jrtc27 at jrtc27 dot com>
- To: binutils at sourceware dot org
- Cc: James Clarke <jrtc27 at jrtc27 dot com>, John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin dot de>, Cary Coutant <ccoutant at gmail dot com>, "Jose E. Marchesi" <jose dot marchesi at oracle dot com>
- Date: Fri, 28 Apr 2017 17:12:14 +0100
- Subject: [PATCH] gold: Fix assertion failure relaxing TLS for position-independent executables
- Authentication-results: sourceware.org; auth=none
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.
---
gold/sparc.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gold/sparc.cc b/gold/sparc.cc
index a9cb93adda..54c7c33498 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);
--
2.12.2