]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
MIPS/testsuite: Expand GAS and LD HI/LO relocation coverage
authorMaciej W. Rozycki <macro@orcam.me.uk>
Sun, 6 Jul 2025 18:22:49 +0000 (19:22 +0100)
committerMaciej W. Rozycki <macro@orcam.me.uk>
Sun, 6 Jul 2025 18:22:49 +0000 (19:22 +0100)
commitae236b71ea7b951f25d84ba1098478458c4e34c9
treeecf95396171919a2e2892b0c7b90ddd705dcf376
parenta30fb6667a3d51ab3330df721fa5a8b8f26dd90e
MIPS/testsuite: Expand GAS and LD HI/LO relocation coverage

Expand test coverage for HI/LO relocation handling and add conventional
MIPS and microMIPS GAS tests as well as conventional MIPS, microMIPS,
and MIPS16e2 LD tests, covering R_MIPS_HI16, R_MIPS_LO16, R_MIPS16_HI16,
R_MIPS16_LO16, R_MICROMIPS_HI16, and R_MICROMIPS_LO16 relocations, as
well as 64-bit R_MIPS_HIGHEST, R_MIPS_HIGHER, R_MICROMIPS_HIGHEST, and
R_MICROMIPS_HIGHER relocations.

Modify the linker script so as to retain the `.MIPS.abiflags' section so
as to disassemble MIPS16e2 code correctly, as MIPS16e2 ASE information
is only carried in that section and not in ELF file header's `e_flags'.

MIPS16e2 and microMIPS code requires at least the MIPS32r2 ISA (or the
MIPS64r2 one for the n32 and n64 ABIs), which is incompatible with the
`mips:5900' linker output architecture and causes link failures such as:

./ld-new: tmpdir/mips-hilo1.o: linking mips:isa32r2 module with previous mips:5900 modules
./ld-new: failed to merge target specific data of file tmpdir/mips-hilo1.o

Therefore exclude `mips*el-ps2-elf*' targets from microMIPS and MIPS16e2
LD testing.
25 files changed:
gas/testsuite/gas/mips/micromips-hilo-n32.d [new file with mode: 0644]
gas/testsuite/gas/mips/micromips-hilo-n64.d [new file with mode: 0644]
gas/testsuite/gas/mips/micromips-hilo.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips-hilo-n32.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips-hilo-n64.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips-hilo-n64.s [new file with mode: 0644]
gas/testsuite/gas/mips/mips-hilo.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips-hilo.s [moved from gas/testsuite/gas/mips/mips16e2-hilo.s with 99% similarity]
gas/testsuite/gas/mips/mips.exp
gas/testsuite/gas/mips/mips16e2-hilo-n32.d
gas/testsuite/gas/mips/mips16e2-hilo.d
ld/testsuite/ld-mips-elf/micromips-hilo-n32.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/micromips-hilo-n64.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/micromips-hilo.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/mips-elf.exp
ld/testsuite/ld-mips-elf/mips-hilo-n32.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/mips-hilo-n64.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/mips-hilo.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/mips-hilo.ld [moved from ld/testsuite/ld-mips-elf/mips16-hilo.ld with 84% similarity]
ld/testsuite/ld-mips-elf/mips-hilo.s [new file with mode: 0644]
ld/testsuite/ld-mips-elf/mips16-hilo-n32.d
ld/testsuite/ld-mips-elf/mips16-hilo.d
ld/testsuite/ld-mips-elf/mips16-hilo.s
ld/testsuite/ld-mips-elf/mips16e2-hilo-n32.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/mips16e2-hilo.d [new file with mode: 0644]