binutils-gdb/ld/testsuite/ld-mips-elf/unaligned-jalx-2.d
Maciej W. Rozycki 67e789ae32 MIPS/LD/testsuite: Fix unaligned JALX failures with OpenBSD targets
There are only n64 linker emulations included with `mips64*-*-openbsd*'
targets, however the unaligned JALX tests insist on running across all
targets and force the n32 ABI, causing link errors with the targets
concerned, e.g.:

./ld-new: tmpdir/unaligned-jalx-0.o: ABI is incompatible with that of the selected emulation
./ld-new: failed to merge target specific data of file tmpdir/unaligned-jalx-0.o
./ld-new: tmpdir/unaligned-insn.o: ABI is incompatible with that of the selected emulation
./ld-new: failed to merge target specific data of file tmpdir/unaligned-insn.o

Convert the tests then to use the per-ABI framework and run them for the
o32 and n32 ABIs, removing these regressions:

mips64-openbsd  -FAIL: MIPS JALX to unaligned symbol 0
mips64-openbsd  -FAIL: MIPS JALX to unaligned symbol 1
mips64-openbsd  -FAIL: MIPS JALX to unaligned symbol 2
mips64-openbsd  -FAIL: MIPS JALX to unaligned symbol 3
mips64-openbsd  -FAIL: MIPS16 JALX to unaligned symbol 0
mips64-openbsd  -FAIL: MIPS16 JALX to unaligned symbol 1
mips64-openbsd  -FAIL: microMIPS JALX to unaligned symbol 0
mips64-openbsd  -FAIL: microMIPS JALX to unaligned symbol 1
mips64el-openbsd  -FAIL: MIPS JALX to unaligned symbol 0
mips64el-openbsd  -FAIL: MIPS JALX to unaligned symbol 1
mips64el-openbsd  -FAIL: MIPS JALX to unaligned symbol 2
mips64el-openbsd  -FAIL: MIPS JALX to unaligned symbol 3
mips64el-openbsd  -FAIL: MIPS16 JALX to unaligned symbol 0
mips64el-openbsd  -FAIL: MIPS16 JALX to unaligned symbol 1
mips64el-openbsd  -FAIL: microMIPS JALX to unaligned symbol 0
mips64el-openbsd  -FAIL: microMIPS JALX to unaligned symbol 1

Similar tests for the n64 ABI can be added separately, using suitable
dump patterns.

	ld/
	* testsuite/ld-mips-elf/unaligned-jalx-0.d: Remove `-32' from
	the `as' tag.
	* testsuite/ld-mips-elf/unaligned-jalx-1.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-2.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-3.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-mips16-0.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-mips16-1.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-micromips-0.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-micromips-1.d: Likewise.
	* testsuite/ld-mips-elf/mips-elf.exp: Run unaligned JALX tests
	with `run_dump_test_o32' and `run_dump_test_n32' rather than
	`run_dump_test'.
2023-07-28 06:00:36 +01:00

8 lines
226 B
Makefile

#name: MIPS JALX to unaligned symbol 2
#source: unaligned-jalx-2.s
#source: unaligned-insn.s -mips16
#as: -EB
#ld: -EB -Ttext 0x1c000000 -e 0x1c000000
#objdump: -dr --prefix-addresses --show-raw-insn
#dump: unaligned-jalx-0.d