Hi, Please can someone review and approve the attached patch? The patch does the following: * Adds a command line option to ld --[no-]fix-erratum-760522, which is enabled by default. * When the option is on the linker will only use BLX if the target architecture (derived from the object files) is v6T2, v7, or greater. * --use-blx keeps its current meaning and will override this option. A description of the issue can be found on the ARM website at: http://infocenter.arm.com/help/topic/com.arm.doc.uan0002a/UAN002A_1176-pan_use_of_blx.pdf Alternatively by following: http://infocenter.arm.com/ User Assistance Notes ARM11 Processors ARM1176JZ-S and ARM1176JFZ-S Programmer Advice Note The workaround has been applied to more cores than just ARM1176 to ensure appropriate forwards compatibility from earlier CPUs. Thanks, Matt bfd/ChangeLog: 2011-07-27 Matthew Gretton-Dann * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype. * bfd-in2.h (bfd_elf32_arm_set_target_relocs): Likewise. * 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_erratum_760522. (bfd_elf32_arm_set_target_relocs): Set fix_erratum_760522 from command line options. ld/ChangeLog: 2011-07-27 Matthew Gretton-Dann * emultempl/armelf.em (fix_erratum_760522): New variable. (arm_elf_create_output_section_statements): Pass fix_erratum_760522 option to bfd backend. (OPTION_FIX_ERRATUM_760522): New define. (OPTION_NO_FIX_ERRATUM_760522): Likewise. (PARSE_AND_LIST_LONGOPTS): Add --[no-]fix-erratum-760522 command line options. (PARSE_AND_LIST_OPTIONS): Likewise. (PARSE_AND_LIST_ARGS_CASES): Likewise. ld/testsuite/ChangeLog: 2011-07-27 Matthew Gretton-Dann * 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-arm/erratum-760522-off.d: New test case. * ld-arm/erratum-760522-on.d: Likewise. * ld-arm/erratum-760522.s: Likewise. Thanks, Matt -- Matthew Gretton-Dann Principal Engineer, PD Software - Tools, ARM Ltd