aboutsummaryrefslogtreecommitdiff
path: root/gold/i386.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2010-02-10 23:00:29 +0000
committerIan Lance Taylor <ian@airs.com>2010-02-10 23:00:29 +0000
commitb3705d2a514a4235bd08c02f708f02b1c9285019 (patch)
tree78163071d0cf840f3bd90f4576400edc9e6bbcb5 /gold/i386.cc
parent1677b03c9001d73566c7cf0bbbf65e830a07eaec (diff)
downloadgdb-b3705d2a514a4235bd08c02f708f02b1c9285019.zip
gdb-b3705d2a514a4235bd08c02f708f02b1c9285019.tar.gz
gdb-b3705d2a514a4235bd08c02f708f02b1c9285019.tar.bz2
* i386.cc (Relocate::relocate_tls): A local symbol is final if not
shared, not if not position independent. * x86_64.cc (Relocate::relocate_tls): Likewise. * testsuite/Makefile.am (check_PROGRAMS): Add tls_pie_pic_test. (tls_pie_pic_test): New target. * testsuite/Makefile.in: Rebuild.
Diffstat (limited to 'gold/i386.cc')
-rw-r--r--gold/i386.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/gold/i386.cc b/gold/i386.cc
index f2a7b53..97d98d7 100644
--- a/gold/i386.cc
+++ b/gold/i386.cc
@@ -1897,10 +1897,9 @@ Target_i386::Relocate::relocate_tls(const Relocate_info<32, false>* relinfo,
elfcpp::Elf_types<32>::Elf_Addr value = psymval->value(object, 0);
- const bool is_final =
- (gsym == NULL
- ? !parameters->options().output_is_position_independent()
- : gsym->final_value_is_known());
+ const bool is_final = (gsym == NULL
+ ? !parameters->options().shared()
+ : gsym->final_value_is_known());
const tls::Tls_optimization optimized_type
= Target_i386::optimize_tls_reloc(is_final, r_type);
switch (r_type)