binutils-gdb/ld/testsuite
Maciej W. Rozycki c9775dde32 MIPS16: Add R_MIPS16_PC16_S1 branch relocation support
For R_MIPS16_PC16_S1 the calculation is `(sign_extend(A) + S - P) >> 1'
and the usual MIPS16 bit shuffling applies to relocated field handling,
as per the encoding of the branch target in the extended form of the
MIPS16 B, BEQZ, BNEZ, BTEQZ and BTNEZ instructions.

	include/
	* elf/mips.h (R_MIPS16_PC16_S1): New relocation.

	bfd/
	* elf32-mips.c (elf_mips16_howto_table_rel): Add
	R_MIPS16_PC16_S1.
	(mips16_reloc_map): Likewise.
	* elf64-mips.c (mips16_elf64_howto_table_rel): Likewise.
	(mips16_elf64_howto_table_rela): Likewise.
	(mips16_reloc_map): Likewise.
	* elfn32-mips.c (elf_mips16_howto_table_rel): Likewise.
	(elf_mips16_howto_table_rela): Likewise.
	(mips16_reloc_map): Likewise.
	* elfxx-mips.c (mips16_branch_reloc_p): New function.
	(mips16_reloc_p): Handle R_MIPS16_PC16_S1.
	(b_reloc_p): Likewise.
	(mips_elf_calculate_relocation): Likewise.
	(_bfd_mips_elf_check_relocs): Likewise.
	* reloc.c (BFD_RELOC_MIPS16_16_PCREL_S1): New relocation.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.

	gas/
	* config/tc-mips.c (mips16_reloc_p): Handle
	BFD_RELOC_MIPS16_16_PCREL_S1.
	(b_reloc_p): Likewise.
	(limited_pcrel_reloc_p): Likewise.
	(md_pcrel_from): Likewise.
	(md_apply_fix): Likewise.
	(tc_gen_reloc): Likewise.
	(md_convert_frag): Likewise.
	(mips_fix_adjustable): Update comment.
	* testsuite/gas/mips/mips16-branch-reloc-2.d: Remove error
	output, add dump patterns.
	* testsuite/gas/mips/mips16-branch-reloc-3.d: Remove error
	output, add dump patterns.
	* testsuite/gas/mips/mips16-branch-addend-2.d: Remove error
	output, add dump patterns.
	* testsuite/gas/mips/mips16-branch-addend-3.d: Remove error
	output, add dump patterns.
	* testsuite/gas/mips/mips16-branch-absolute.d: Remove error
	output, add dump patterns.
	* testsuite/gas/mips/mips16-branch-reloc-2.l: Remove file.
	* testsuite/gas/mips/mips16-branch-reloc-3.l: Remove file.
	* testsuite/gas/mips/mips16-branch-addend-2.l: Remove file.
	* testsuite/gas/mips/mips16-branch-addend-3.l: Remove file.
	* testsuite/gas/mips/mips16-branch-absolute.l: Remove file.
	* testsuite/gas/mips/mips16-branch-addend-2.s: Add padding.
	* testsuite/gas/mips/branch-weak.s: Adjust alignment, avoid
	implicit instruction padding, avoid MIPS16 JR->JRC conversion.
	* testsuite/gas/mips/branch-weak-6.d: New test.
	* testsuite/gas/mips/branch-weak-7.d: New test.
	* testsuite/gas/mips/mips.exp: Run the new tests.

	ld/
	* testsuite/ld-mips-elf/mips16-branch-2.d: New test.
	* testsuite/ld-mips-elf/mips16-branch-3.d: New test.
	* testsuite/ld-mips-elf/mips16-branch-addend-2.d: New test.
	* testsuite/ld-mips-elf/mips16-branch-addend-3.d: New test.
	* testsuite/ld-mips-elf/mips16-branch.s: New test source.
	* testsuite/ld-mips-elf/mips-elf.exp: Run the new tests.
2016-06-28 01:29:56 +01:00
..
config ld: Add a linker configure option --enable-relro 2016-06-22 05:37:38 -07:00
ld-aarch64 aarch64 ld testsuite 2016-06-24 23:05:48 +09:30
ld-alpha Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-arc Arc assembler: Convert nps400 from a machine type to an extension. 2016-06-21 14:03:08 +01:00
ld-arm Add support for Thumb-2 long branch veneers 2016-06-17 18:28:08 +01:00
ld-auto-import Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-avr Fix PR ld/20254 2016-06-15 12:47:46 +05:30
ld-bootstrap Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-cdtest Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-checks Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-cris ELF/LD: Avoid producing hidden and internal dynamic symbols 2016-04-05 15:14:54 +01:00
ld-crx Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-cygwin Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-d10v Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-discard [ARC] Fix ld testsuite failures. 2016-04-05 13:46:44 +02:00
ld-elf ld/testsuite/ld-elf/init-fini-arrays.d: Remove `ft32-*-*' xfail 2016-06-07 16:05:49 +01:00
ld-elfcomm Skip ELF STT_COMMON linker tests if shared libraries are not supported. 2016-05-03 10:44:35 +01:00
ld-elfvers Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-elfvsb Skip debug sections when estimating distances 2016-04-27 09:13:10 -07:00
ld-elfweak Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-fastcall Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-frv Make linker assigned symbol dynamic only for shared object 2016-02-23 05:19:03 -08:00
ld-gc Fix some AVR test failures. 2016-05-04 13:03:52 +01:00
ld-h8300 Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-i386 Don't generate PLT for IFUNC GOT/pointer reference 2016-06-18 09:17:25 -07:00
ld-ia64 Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-ifunc Don't generate PLT for IFUNC GOT/pointer reference 2016-06-18 09:17:25 -07:00
ld-libs Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-linkonce Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-m68hc11 Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-m68k Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-mep Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-metag Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-mips-elf MIPS16: Add R_MIPS16_PC16_S1 branch relocation support 2016-06-28 01:29:56 +01:00
ld-misc Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-mmix Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-mn10300 Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-nds32 Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-nios2
ld-pe Improve COFF/PE linker garbage collection by preventing the removal of sections containing exported symbols. 2016-03-22 12:25:08 +00:00
ld-pie Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-plugin Use the IR symbol table for the IR input object 2016-06-20 05:10:46 -07:00
ld-powerpc PowerPC VLE 2016-06-07 22:04:38 +09:30
ld-s390 Fix PLT first entry GOT operand calculation. 2016-06-07 16:47:10 +02:00
ld-scripts Allow a second -T<section>=<addr> to override a previous version on the same linker command line. 2016-06-27 16:35:58 +01:00
ld-selective Fix some AVR test failures. 2016-05-04 13:03:52 +01:00
ld-sh Enhance GAS's .section directive so that it can take numeric values for the flags and type fields. (ELF only) 2016-02-15 11:11:46 +00:00
ld-shared Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-size Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-sparc Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-spu Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-srec [ARC] XFAIL S-Records tests for both little and big endian ARC target. 2016-06-13 16:15:58 +02:00
ld-tic6x Enhance GAS's .section directive so that it can take numeric values for the flags and type fields. (ELF only) 2016-02-15 11:11:46 +00:00
ld-tilegx Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-tilepro Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-undefined Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-unique LD/ELF: Unify STB_GNU_UNIQUE handling 2016-05-17 12:21:40 +01:00
ld-v850 Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-vax-elf Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-versados Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-visium Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-vxworks Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-x86-64 Don't generate PLT for IFUNC GOT/pointer reference 2016-06-18 09:17:25 -07:00
ld-xc16x Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-xstormy16 Copyright update for binutils 2016-01-01 23:00:01 +10:30
ld-xtensa Enhance GAS's .section directive so that it can take numeric values for the flags and type fields. (ELF only) 2016-02-15 11:11:46 +00:00
ld-z8k ld/testsuite/ld-z8k/test-ld.sh: Remove. Checked in by mistake. 2016-06-04 22:39:46 +02:00
lib ld: Add a linker configure option --enable-relro 2016-06-22 05:37:38 -07:00
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015 binutils ChangeLog rotation 2016-01-01 22:59:17 +10:30
ChangeLog-9303