diff options
Diffstat (limited to 'ld/emultempl/mipself.em')
-rw-r--r-- | ld/emultempl/mipself.em | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/ld/emultempl/mipself.em b/ld/emultempl/mipself.em index 74ede87..cd68707 100644 --- a/ld/emultempl/mipself.em +++ b/ld/emultempl/mipself.em @@ -34,6 +34,7 @@ static lang_input_statement_type *stub_file; static bfd *stub_bfd; static bfd_boolean insn32; +static bfd_boolean ignore_branch_isa; static void mips_after_parse (void) @@ -202,7 +203,7 @@ mips_create_output_section_statements (void) htab = elf_hash_table (&link_info); if (is_elf_hash_table (htab) && is_mips_elf (link_info.output_bfd)) - _bfd_mips_elf_insn32 (&link_info, insn32); + _bfd_mips_elf_linker_flags (&link_info, insn32, ignore_branch_isa); if (is_mips_elf (link_info.output_bfd)) _bfd_mips_elf_init_stubs (&link_info, mips_add_stub_section); @@ -253,13 +254,17 @@ PARSE_AND_LIST_PROLOGUE=' enum { OPTION_INSN32 = 301, - OPTION_NO_INSN32 + OPTION_NO_INSN32, + OPTION_IGNORE_BRANCH_ISA, + OPTION_NO_IGNORE_BRANCH_ISA }; ' PARSE_AND_LIST_LONGOPTS=' { "insn32", no_argument, NULL, OPTION_INSN32 }, { "no-insn32", no_argument, NULL, OPTION_NO_INSN32 }, + { "ignore-branch-isa", no_argument, NULL, OPTION_IGNORE_BRANCH_ISA }, + { "no-ignore-branch-isa", no_argument, NULL, OPTION_NO_IGNORE_BRANCH_ISA }, ' PARSE_AND_LIST_OPTIONS=' @@ -269,6 +274,14 @@ PARSE_AND_LIST_OPTIONS=' fprintf (file, _("\ --no-insn32 Generate all microMIPS instructions\n" )); + fprintf (file, _("\ + --ignore-branch-isa Accept invalid branch relocations requiring\n\ + an ISA mode switch\n" + )); + fprintf (file, _("\ + --no-ignore-branch-isa Reject invalid branch relocations requiring\n\ + an ISA mode switch\n" + )); ' PARSE_AND_LIST_ARGS_CASES=' @@ -279,6 +292,14 @@ PARSE_AND_LIST_ARGS_CASES=' case OPTION_NO_INSN32: insn32 = FALSE; break; + + case OPTION_IGNORE_BRANCH_ISA: + ignore_branch_isa = TRUE; + break; + + case OPTION_NO_IGNORE_BRANCH_ISA: + ignore_branch_isa = FALSE; + break; ' LDEMUL_AFTER_PARSE=mips_after_parse |