aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorMatthew Gretton-Dann <matthew.gretton-dann@arm.com>2011-08-09 13:10:44 +0000
committerMatthew Gretton-Dann <matthew.gretton-dann@arm.com>2011-08-09 13:10:44 +0000
commit2de70689ff968c2f5ea1056efd67e7b465c47038 (patch)
tree55de7248d73b2effa0c307b089051ac36a2775e7 /ld/emultempl
parent94b71ccaca00091a728813bad291a6c787aea044 (diff)
downloadbinutils-2de70689ff968c2f5ea1056efd67e7b465c47038.zip
binutils-2de70689ff968c2f5ea1056efd67e7b465c47038.tar.gz
binutils-2de70689ff968c2f5ea1056efd67e7b465c47038.tar.bz2
* bfd/bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
* bfd/bfd-in2.h (bfd_elf32_arm_set_target_relocs): Likewise. * bfd/elf32-arm.c (elf32_arm_link_hash_table): New field. (elf232_arm_link_hash_table_create): Initialise new field. (check_use_blx): Change test depending on fix_arm1176. (bfd_elf32_arm_set_target_relocs): Set fix_arm1176 from command line options. * ld/emultempl/armelf.em (fix_arm1176): New variable. (arm_elf_create_output_section_statements): Pass fix_arm1176 option to bfd backend. (OPTION_FIX_ARM1176): New define. (OPTION_NO_FIX_ARM1176): Likewise. (PARSE_AND_LIST_LONGOPTS): Add new command line options. (PARSE_AND_LIST_OPTIONS): Likewise. (PARSE_AND_LIST_ARGS_CASES): Likewise. * ld/ld.texinfo: Document new command line options. * ld/testsuite/ld-arm/arm-elf.exp (armelftests): Update for new command-line options. (armeabitests): Update for new command-line options, and add new test cases. * ld/testsuite/ld-arm/fix-arm1176.s: Add test case. * ld/testsuite/ld-arm/fix-arm1176-off.d: Likewise. * ld/testsuite/ld-arm/fix-arm1176-on.d: Likewise.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/armelf.em18
1 files changed, 16 insertions, 2 deletions
diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em
index 948bf8d..d29da59 100644
--- a/ld/emultempl/armelf.em
+++ b/ld/emultempl/armelf.em
@@ -42,6 +42,7 @@ static int no_enum_size_warning = 0;
static int no_wchar_size_warning = 0;
static int pic_veneer = 0;
static int merge_exidx_entries = -1;
+static int fix_arm1176 = 1;
static void
gld${EMULATION_NAME}_before_parse (void)
@@ -464,7 +465,8 @@ arm_elf_create_output_section_statements (void)
target2_type, fix_v4bx, use_blx,
vfp11_denorm_fix, no_enum_size_warning,
no_wchar_size_warning,
- pic_veneer, fix_cortex_a8);
+ pic_veneer, fix_cortex_a8,
+ fix_arm1176);
stub_file = lang_add_input_file ("linker stubs",
lang_input_file_is_fake_enum,
@@ -529,6 +531,8 @@ PARSE_AND_LIST_PROLOGUE='
#define OPTION_FIX_CORTEX_A8 314
#define OPTION_NO_FIX_CORTEX_A8 315
#define OPTION_NO_MERGE_EXIDX_ENTRIES 316
+#define OPTION_FIX_ARM1176 317
+#define OPTION_NO_FIX_ARM1176 318
'
PARSE_AND_LIST_SHORTOPTS=p
@@ -551,6 +555,8 @@ PARSE_AND_LIST_LONGOPTS='
{ "fix-cortex-a8", no_argument, NULL, OPTION_FIX_CORTEX_A8 },
{ "no-fix-cortex-a8", no_argument, NULL, OPTION_NO_FIX_CORTEX_A8 },
{ "no-merge-exidx-entries", no_argument, NULL, OPTION_NO_MERGE_EXIDX_ENTRIES },
+ { "fix-arm1176", no_argument, NULL, OPTION_FIX_ARM1176 },
+ { "no-fix-arm1176", no_argument, NULL, OPTION_NO_FIX_ARM1176 },
'
PARSE_AND_LIST_OPTIONS='
@@ -579,7 +585,7 @@ PARSE_AND_LIST_OPTIONS='
));
fprintf (file, _(" --[no-]fix-cortex-a8 Disable/enable Cortex-A8 Thumb-2 branch erratum fix\n"));
fprintf (file, _(" --no-merge-exidx-entries Disable merging exidx entries\n"));
-
+ fprintf (file, _(" --[no-]fix-arm1176 Disable/enable ARM1176 BLX immediate erratum fix\n"));
'
PARSE_AND_LIST_ARGS_CASES='
@@ -662,7 +668,15 @@ PARSE_AND_LIST_ARGS_CASES='
case OPTION_NO_MERGE_EXIDX_ENTRIES:
merge_exidx_entries = 0;
+ break;
+ case OPTION_FIX_ARM1176:
+ fix_arm1176 = 1;
+ break;
+
+ case OPTION_NO_FIX_ARM1176:
+ fix_arm1176 = 0;
+ break;
'
# We have our own before_allocation etc. functions, but they call