binutils-gdb/ld/testsuite/ld-mips-elf/unaligned-jalx-addend-1.s
Maciej W. Rozycki bc27bb0573 MIPS/BFD: Include the addend in JALX's target alignment verification
On RELA targets the addend can affect JALX target's alignment, so only
verify it once the whole relocation calculation has completed.

	bfd/
	* elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS16_26>
	<R_MIPS_26, R_MICROMIPS_26_S1>: Include the addend in JALX's
	target alignment verification.

	ld/
	* testsuite/ld-mips-elf/unaligned-jalx-addend-0.d: New test.
	* testsuite/ld-mips-elf/unaligned-jalx-addend-1.d: New test.
	* testsuite/ld-mips-elf/unaligned-jalx-addend-mips16-0.d: New
	test.
	* testsuite/ld-mips-elf/unaligned-jalx-addend-mips16-1.d: New
	test.
	* testsuite/ld-mips-elf/unaligned-jalx-addend-micromips-0.d: New
	test.
	* testsuite/ld-mips-elf/unaligned-jalx-addend-micromips-1.d: New
	test.
	* testsuite/ld-mips-elf/unaligned-jalx-addend-0.s: New test
	source.
	* testsuite/ld-mips-elf/unaligned-jalx-addend-1.s: New test
	source.
	* testsuite/ld-mips-elf/mips-elf.exp: Run the new tests.
2016-05-27 22:31:29 +01:00

23 lines
317 B
ArmAsm

.text
.align 4
.globl foo
.ent foo
foo:
jal bar0 + 1
jal bar0 + 2
jal bar0 + 3
jal bar1 + 1
jal bar1 + 3
jal bar1 + 4
jal bar2 - 1
jal bar2 - 2
jal bar2 - 3
jal bar3 - 1
jal bar3 - 3
jal bar3 - 4
.end foo
# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
.align 4, 0
.space 16