aboutsummaryrefslogtreecommitdiff
path: root/gold/x86_64.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2008-08-15 04:57:46 +0000
committerCary Coutant <ccoutant@google.com>2008-08-15 04:57:46 +0000
commitd85c80a35397436352e65447cc42e5a0cde9c51a (patch)
treedc027ecf78d4c7f25bf8a3cec0d33d63499e2fff /gold/x86_64.cc
parent56c2003cdefd26149d2524efdf68cf51f5ed8c89 (diff)
downloadgdb-d85c80a35397436352e65447cc42e5a0cde9c51a.zip
gdb-d85c80a35397436352e65447cc42e5a0cde9c51a.tar.gz
gdb-d85c80a35397436352e65447cc42e5a0cde9c51a.tar.bz2
2008-08-14 Cary Coutant <ccoutant@google.com>
* x86_64.cc (Target_x86_64::Relocate::relocat_tls): Use addend for DTPOFF32, DTPOFF64, and TPOFF32 relocs. * testsuite/tls_test.cc (struct int128): 128-bit struct for testing TLS relocs with non-zero addend. (v12): New TLS variable. (t12): New test. (t_last): Add check for v12. * testsuite/tls_test.h (t12): New function. * testsuite/tls_test_main.cc (thread_routine): Call new test.
Diffstat (limited to 'gold/x86_64.cc')
-rw-r--r--gold/x86_64.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gold/x86_64.cc b/gold/x86_64.cc
index cbbd5cc..2daa9bf 100644
--- a/gold/x86_64.cc
+++ b/gold/x86_64.cc
@@ -2054,7 +2054,7 @@ Target_x86_64::Relocate::relocate_tls(const Relocate_info<64, false>* relinfo,
if (this->saw_tls_block_reloc_)
value -= tls_segment->memsz();
}
- Relocate_functions<64, false>::rela32(view, value, 0);
+ Relocate_functions<64, false>::rela32(view, value, addend);
break;
case elfcpp::R_X86_64_DTPOFF64:
@@ -2065,7 +2065,7 @@ Target_x86_64::Relocate::relocate_tls(const Relocate_info<64, false>* relinfo,
if (this->saw_tls_block_reloc_)
value -= tls_segment->memsz();
}
- Relocate_functions<64, false>::rela64(view, value, 0);
+ Relocate_functions<64, false>::rela64(view, value, addend);
break;
case elfcpp::R_X86_64_GOTTPOFF: // Initial-exec
@@ -2107,7 +2107,7 @@ Target_x86_64::Relocate::relocate_tls(const Relocate_info<64, false>* relinfo,
case elfcpp::R_X86_64_TPOFF32: // Local-exec
value -= tls_segment->memsz();
- Relocate_functions<64, false>::rela32(view, value, 0);
+ Relocate_functions<64, false>::rela32(view, value, addend);
break;
}
}