diff options
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r-- | gold/symtab.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc index 88e9322..8ec8f73 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -437,9 +437,12 @@ bool Symbol::final_value_is_known() const { // If we are not generating an executable, then no final values are - // known, since they will change at runtime. - if (parameters->options().output_is_position_independent() - || parameters->options().relocatable()) + // known, since they will change at runtime, with the exception of + // TLS symbols in a position-independent executable. + if ((parameters->options().output_is_position_independent() + || parameters->options().relocatable()) + && !(this->type() == elfcpp::STT_TLS + && parameters->options().pie())) return false; // If the symbol is not from an object file, and is not undefined, |