From: James Clarke Date: Sat, 13 May 2017 15:01:15 +0000 (-0700) Subject: Fix assertion failure relaxing TLS for position-independent executables. X-Git-Tag: users/ARM/embedded-binutils-2_28-branch-2017q2~50 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2346a98c797e69d0d10b7935ac8d8772365f2ca2;p=thirdparty%2Fbinutils-gdb.git 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. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index d598386fd7a..eaf30d3913d 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,11 @@ +2017-05-13 James Clarke + + 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 * powerpc.cc (Target_powerpc::make_iplt_section): Check that diff --git a/gold/sparc.cc b/gold/sparc.cc index a9cb93adda2..54c7c334984 100644 --- a/gold/sparc.cc +++ b/gold/sparc.cc @@ -3730,7 +3730,7 @@ Target_sparc::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);