diff --git a/gold/ChangeLog b/gold/ChangeLog index 51d6a0f1fc..0f1f4e54f2 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-05-12 Igor Kudrin PR gold/21430 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::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);