aboutsummaryrefslogtreecommitdiff
path: root/gold/arm.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2011-11-03 03:38:34 +0000
committerIan Lance Taylor <ian@airs.com>2011-11-03 03:38:34 +0000
commita8e2273bba9b658132165d70edb8b47023193e82 (patch)
tree020ead7a07c53309d4b6aac0b7f32a989937c1b4 /gold/arm.cc
parent983fb131e91595e10952d6c965647b76a33d6384 (diff)
downloadfsf-binutils-gdb-a8e2273bba9b658132165d70edb8b47023193e82.zip
fsf-binutils-gdb-a8e2273bba9b658132165d70edb8b47023193e82.tar.gz
fsf-binutils-gdb-a8e2273bba9b658132165d70edb8b47023193e82.tar.bz2
* arm.cc (Target_arm::may_use_v5t_interworking): Check whether
we are working around the ARM1176 Erratum. * options.h (General_options::fix_arm1176): Add option. * testsuite/Makefile.am: Add testcases, and keep current ones working. * testsuite/Makefile.in: Regenerate. * testsuite/arm_fix_1176.s: New file. * testsuite/arm_fix_1176.sh: Likewise.
Diffstat (limited to 'gold/arm.cc')
-rw-r--r--gold/arm.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/gold/arm.cc b/gold/arm.cc
index c0a2049..200c371 100644
--- a/gold/arm.cc
+++ b/gold/arm.cc
@@ -2262,9 +2262,16 @@ class Target_arm : public Sized_target<32, big_endian>
Object_attribute* attr =
this->get_aeabi_object_attribute(elfcpp::Tag_CPU_arch);
int arch = attr->int_value();
- return (arch != elfcpp::TAG_CPU_ARCH_PRE_V4
- && arch != elfcpp::TAG_CPU_ARCH_V4
- && arch != elfcpp::TAG_CPU_ARCH_V4T);
+ if (parameters->options().fix_arm1176())
+ return (arch == elfcpp::TAG_CPU_ARCH_V6T2
+ || arch == elfcpp::TAG_CPU_ARCH_V7
+ || arch == elfcpp::TAG_CPU_ARCH_V6_M
+ || arch == elfcpp::TAG_CPU_ARCH_V6S_M
+ || arch == elfcpp::TAG_CPU_ARCH_V7E_M);
+ else
+ return (arch != elfcpp::TAG_CPU_ARCH_PRE_V4
+ && arch != elfcpp::TAG_CPU_ARCH_V4
+ && arch != elfcpp::TAG_CPU_ARCH_V4T);
}
// Process the relocations to determine unreferenced sections for