aboutsummaryrefslogtreecommitdiff
path: root/gold/aarch64.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/aarch64.cc')
-rw-r--r--gold/aarch64.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/gold/aarch64.cc b/gold/aarch64.cc
index 125953a..d5a0a85 100644
--- a/gold/aarch64.cc
+++ b/gold/aarch64.cc
@@ -6536,6 +6536,11 @@ Target_aarch64<size, big_endian>::Relocate::tls_desc_gd_to_ie(
case elfcpp::R_AARCH64_TLSDESC_LD64_LO12:
{
+ // Set ldr target register to be x0.
+ Insntype insn = elfcpp::Swap<32, big_endian>::readval(ip);
+ insn &= 0xffffffe0;
+ elfcpp::Swap<32, big_endian>::writeval(ip, insn);
+ // Do relocation.
const AArch64_reloc_property* reloc_property =
aarch64_reloc_property_table->get_reloc_property(
elfcpp::R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC);