From 319850b45155323419e8862ee9e1b20d12b3a62d Mon Sep 17 00:00:00 2001 From: Julian Brown Date: Fri, 28 Jan 2005 17:24:41 +0000 Subject: * bfd/bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype. * bfd/bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype. * bfd/elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag. (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for passing flag value from ld. Set flag value in global hash table entry. (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX relocation. * ld/emultempl/armelf.em (fix_v4bx): New variable. (arm_elf_create_output_section_statements): Communicate fix_v4bx flag value to bfd. (PARSE_AND_LIST_PROLOGUE): Add option token OPTION_FIX_V4BX. (PARSE_AND_LIST_LONGOPTS): Add option --fix-v4bx. (PARSE_AND_LIST_OPTIONS): Add option --fix-v4bx. (PARSE_AND_LIST_ARGS_CASES): Add option OPTION_FIX_V4BX. * ld/NEWS: Mention --fix-v4bx. * ld/ld.texinfo: Document --fix-v4bx. --- ld/ld.texinfo | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'ld/ld.texinfo') diff --git a/ld/ld.texinfo b/ld/ld.texinfo index 5452fe9..4511868 100644 --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -5139,6 +5139,20 @@ meanings, and target defaults are as follows: @samp{R_ARM_GOT_PREL} (arm*-*-linux, arm*-*-*bsd) @end table +@cindex FIX_V4BX +@kindex --fix-v4bx +The @samp{R_ARM_V4BX} relocation (defined by the ARM AAELF +specification) enables objects compiled for the ARMv4 architecture to be +interworking-safe when linked with other objects compiled for ARMv4t, but +also allows pure ARMv4 binaries to be built from the same ARMv4 objects. + +In the latter case, the switch @option{--fix-v4bx} must be passed to the +linker, which causes v4t @code{BX rM} instructions to be rewritten as +@code{MOV PC,rM}, since v4 processors do not have a @code{BX} instruction. + +In the former case, the switch should not be used, and @samp{R_ARM_V4BX} +relocations are ignored. + @ifclear GENERIC @lowersections @end ifclear -- cgit v1.1