aboutsummaryrefslogtreecommitdiff
path: root/gold/arm.cc
diff options
context:
space:
mode:
authorDoug Kwan <dougkwan@google.com>2011-11-10 20:53:36 +0000
committerDoug Kwan <dougkwan@google.com>2011-11-10 20:53:36 +0000
commit29ab395d2b246f993e8fd06f71a1fe165d2f3985 (patch)
tree91ec0d782dad8f14333e645c618dc3494675588d /gold/arm.cc
parent50f182aa6671dea0fdcf063d5974c623332f3e63 (diff)
downloadgdb-29ab395d2b246f993e8fd06f71a1fe165d2f3985.zip
gdb-29ab395d2b246f993e8fd06f71a1fe165d2f3985.tar.gz
gdb-29ab395d2b246f993e8fd06f71a1fe165d2f3985.tar.bz2
2011-11-10 Doug Kwan <dougkwan@google.com>
PR gold/13362 * arm.cc (Target_arm::Relocate::relocate_tls): Do unaligned accesses when processing data relocs. * reloc.h (Relocate_functions::rel_unaligned): New method. (Relocate_functions::pcrel_unaligned): Ditto. (Relocate_functions::rel32_unaligned): Ditto. (Relocate_functions::pcrel32_unaligned): Ditto.
Diffstat (limited to 'gold/arm.cc')
-rw-r--r--gold/arm.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/gold/arm.cc b/gold/arm.cc
index a17469b..3ee2224 100644
--- a/gold/arm.cc
+++ b/gold/arm.cc
@@ -9348,7 +9348,7 @@ Target_arm<big_endian>::Relocate::relocate_tls(
// Relocate the field with the PC relative offset of the pair of
// GOT entries.
- RelocFuncs::pcrel32(view, got_entry, address);
+ RelocFuncs::pcrel32_unaligned(view, got_entry, address);
return ArmRelocFuncs::STATUS_OKAY;
}
}
@@ -9367,13 +9367,13 @@ Target_arm<big_endian>::Relocate::relocate_tls(
// Relocate the field with the PC relative offset of the pair of
// GOT entries.
- RelocFuncs::pcrel32(view, got_entry, address);
+ RelocFuncs::pcrel32_unaligned(view, got_entry, address);
return ArmRelocFuncs::STATUS_OKAY;
}
break;
case elfcpp::R_ARM_TLS_LDO32: // Alternate local-dynamic
- RelocFuncs::rel32(view, value);
+ RelocFuncs::rel32_unaligned(view, value);
return ArmRelocFuncs::STATUS_OKAY;
case elfcpp::R_ARM_TLS_IE32: // Initial-exec
@@ -9402,7 +9402,7 @@ Target_arm<big_endian>::Relocate::relocate_tls(
target->got_plt_section()->address() + got_offset;
// Relocate the field with the PC relative offset of the GOT entry.
- RelocFuncs::pcrel32(view, got_entry, address);
+ RelocFuncs::pcrel32_unaligned(view, got_entry, address);
return ArmRelocFuncs::STATUS_OKAY;
}
break;
@@ -9418,7 +9418,7 @@ Target_arm<big_endian>::Relocate::relocate_tls(
// need to add TCB size to the offset.
Arm_address aligned_tcb_size =
align_address(ARM_TCB_SIZE, tls_segment->maximum_alignment());
- RelocFuncs::rel32(view, value + aligned_tcb_size);
+ RelocFuncs::rel32_unaligned(view, value + aligned_tcb_size);
}
return ArmRelocFuncs::STATUS_OKAY;