diff options
Diffstat (limited to 'ld/emultempl/armelf.em')
-rw-r--r-- | ld/emultempl/armelf.em | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em index 886cf8b..d380400 100644 --- a/ld/emultempl/armelf.em +++ b/ld/emultempl/armelf.em @@ -32,6 +32,7 @@ static int byteswap_code = 0; static int target1_is_rel = 0${TARGET1_IS_REL}; static char *target2_type = "${TARGET2_TYPE}"; static int fix_v4bx = 0; +static int use_blx = 0; static void gld${EMULATION_NAME}_before_parse (void) @@ -192,7 +193,7 @@ static void arm_elf_create_output_section_statements (void) { bfd_elf32_arm_set_target_relocs (&link_info, target1_is_rel, target2_type, - fix_v4bx); + fix_v4bx, use_blx); } EOF @@ -206,7 +207,8 @@ PARSE_AND_LIST_PROLOGUE=' #define OPTION_TARGET1_REL 303 #define OPTION_TARGET1_ABS 304 #define OPTION_TARGET2 305 -#define OPTION_FIX_V4BX 306 +#define OPTION_FIX_V4BX 306 +#define OPTION_USE_BLX 307 ' PARSE_AND_LIST_SHORTOPTS=p @@ -219,6 +221,7 @@ PARSE_AND_LIST_LONGOPTS=' { "target1-abs", no_argument, NULL, OPTION_TARGET1_ABS}, { "target2", required_argument, NULL, OPTION_TARGET2}, { "fix-v4bx", no_argument, NULL, OPTION_FIX_V4BX}, + { "use-blx", no_argument, NULL, OPTION_USE_BLX}, ' PARSE_AND_LIST_OPTIONS=' @@ -228,6 +231,7 @@ PARSE_AND_LIST_OPTIONS=' fprintf (file, _(" --target1=abs Interpret R_ARM_TARGET1 as R_ARM_ABS32\n")); fprintf (file, _(" --target2=<type> Specify definition of R_ARM_TARGET2\n")); fprintf (file, _(" --fix-v4bx Rewrite BX rn as MOV pc, rn for ARMv4\n")); + fprintf (file, _(" --use-blx Enable use of BLX instructions\n")); ' PARSE_AND_LIST_ARGS_CASES=' @@ -258,6 +262,10 @@ PARSE_AND_LIST_ARGS_CASES=' case OPTION_FIX_V4BX: fix_v4bx = 1; break; + + case OPTION_USE_BLX: + use_blx = 1; + break; ' # We have our own after_open and before_allocation functions, but they call |