binutils-gdb/ld/emultempl
Maciej W. Rozycki 8b10b0b3e1 MIPS: Add options to control branch ISA checks
Complement commit 9d862524f6 ("MIPS: Verify the ISA mode and alignment
of branch and jump targets") and add GAS and LD options to control the
checks for invalid branches between ISA modes introduced there, to help
with some handwritten code lacking `.insn' annotation for labels used as
branch targets and code produced by older versions of GCC which suffers
from the issue with branches to code that has been optimized away,
addressed with GCC commit 242424 ("MIPS/GCC: Mark trailing labels with
`.insn'"), <https://gcc.gnu.org/ml/gcc-patches/2016-11/msg01061.html>.

	bfd/
	* elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
	(_bfd_mips_elf_linker_flags): ... this.  Add another parameter.
	* elfxx-mips.c (mips_elf_link_hash_table): Add
	`ignore_branch_isa' member.
	(mips_elf_perform_relocation): Do not treat an ISA mode mismatch
	in branch relocation calculation as an error if
	`ignore_branch_isa' has been set.
	(_bfd_mips_elf_insn32): Rename to...
	(_bfd_mips_elf_linker_flags): ... this.  Rename the `on'
	parameter to `insn32' and add an `ignore_branch_isa' parameter.
	Handle the new parameter.

	gas/
	* config/tc-mips.c (mips_ignore_branch_isa): New variable.
	(options): Add OPTION_IGNORE_BRANCH_ISA and
	OPTION_NO_IGNORE_BRANCH_ISA enum values.
	(md_longopts): Add "mignore-branch-isa" and
	"mno-ignore-branch-isa" options.
	(md_parse_option): Handle OPTION_IGNORE_BRANCH_ISA and
	OPTION_NO_IGNORE_BRANCH_ISA.
	(fix_bad_cross_mode_branch_p): Return FALSE if
	`mips_ignore_branch_isa' has been set.
	(md_show_usage): Add `-mignore-branch-isa' and
	`-mno-ignore-branch-isa'.

	* doc/as.texinfo (Target MIPS options): Add
	`-mignore-branch-isa' and `-mno-ignore-branch-isa' options.
	(-mignore-branch-isa, -mno-ignore-branch-isa): New options.
	* doc/c-mips.texi (MIPS Options): Add `-mignore-branch-isa' and
	`-mno-ignore-branch-isa' options.

	* testsuite/gas/mips/branch-local-ignore-2.d: New test.
	* testsuite/gas/mips/branch-local-ignore-3.d: New test.
	* testsuite/gas/mips/branch-local-ignore-n32-2.d: New test.
	* testsuite/gas/mips/branch-local-ignore-n32-3.d: New test.
	* testsuite/gas/mips/branch-local-ignore-n64-2.d: New test.
	* testsuite/gas/mips/branch-local-ignore-n64-3.d: New test.
	* testsuite/gas/mips/mips.exp: Run the new tests.

	ld/
	* emultempl/mipself.em (ignore_branch_isa): New variable.
	(mips_create_output_section_statements): Rename
	`_bfd_mips_elf_insn32' called to `_bfd_mips_elf_linker_flags',
	add `ignore_branch_isa' argument.
	(PARSE_AND_LIST_PROLOGUE): Add OPTION_IGNORE_BRANCH_ISA and
	OPTION_NO_IGNORE_BRANCH_ISA enum values.
	(PARSE_AND_LIST_LONGOPTS): Add "ignore-branch-isa" and
	"no-ignore-branch-isa" options.
	(PARSE_AND_LIST_OPTIONS): Add `--ignore-branch-isa' and
	`--no-ignore-branch-isa'.
	(PARSE_AND_LIST_ARGS_CASES): Handle OPTION_IGNORE_BRANCH_ISA and
	OPTION_NO_IGNORE_BRANCH_ISA.

	* ld.texinfo (Options specific to MIPS targets): Add
	`--ignore-branch-isa' and `--no-ignore-branch-isa' options.
	(ld and the MIPS family): Likewise.

	* testsuite/ld-mips-elf/bal-jalx-pic-ignore.d: New test.
	* testsuite/ld-mips-elf/bal-jalx-pic-ignore-n32.d: New test.
	* testsuite/ld-mips-elf/bal-jalx-pic-ignore-n64.d: New test.
	* testsuite/ld-mips-elf/unaligned-branch-ignore-2.d: New test.
	* testsuite/ld-mips-elf/unaligned-branch-ignore-r6-1: New test.
	* testsuite/ld-mips-elf/unaligned-branch-ignore-mips16: New
	test.
	* testsuite/ld-mips-elf/unaligned-branch-ignore-micromips: New
	test.
	* testsuite/ld-mips-elf/mips-elf.exp: Run the new tests.
2017-01-30 17:16:01 +00:00
..
README Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
aarch64elf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
aix.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
alphaelf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
arclinux.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
armcoff.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
armelf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
astring.sed * emultempl/ostring.sed: Rename from stringify.sed. 1999-08-06 22:46:03 +00:00
avrelf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
beos.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
bfin.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
cr16elf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
crxelf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
elf-generic.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
elf32.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
epiphanyelf_4x4.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
genelf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
generic.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
gld960.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
gld960c.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
hppaelf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
ia64elf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
irix.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
linux.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
lnk960.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
m68hc1xelf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
m68kcoff.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
m68kelf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
metagelf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
mipself.em MIPS: Add options to control branch ISA checks 2017-01-30 17:16:01 +00:00
mmix-elfnmmo.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
mmixelf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
mmo.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
msp430.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
nds32elf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
needrelax.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
netbsd.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
nios2elf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
ostring.sed * emultempl/ostring.sed: Rename from stringify.sed. 1999-08-06 22:46:03 +00:00
pe.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
pep.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
ppc32elf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
ppc64elf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
pruelf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
riscvelf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
rxelf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
scoreelf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
sh64elf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
solaris2.em Solaris2/LD: Fix anonymous version script acceptance bug 2017-01-24 12:53:52 +00:00
spu_icache.S bfd/ 2009-03-17 12:46:19 +00:00
spu_icache.o_c Regenerate spu overlay and icache manager files 2014-11-04 22:36:13 +10:30
spu_ovl.S Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
spu_ovl.o_c Regenerate spu_ovl.o_c 2016-10-15 12:53:57 +10:30
spuelf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
sunos.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
tic6xdsbt.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
ticoff.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
v850elf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
vanilla.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
vms.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
vxworks.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
xtensaelf.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
z80.em Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30

README

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

The files in this directory are sourced by genscripts.sh, after
setting some variables to substitute in, to produce
C source files that contain jump tables for each emulation.

Copyright (C) 2012-2017 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.