mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
78da84f994
Similarly to commit 86b24e15c4
("MIPS/LD/testsuite: Correct
comm-data.exp test ABI/emul/endian arrangement") update the mips-elf.exp
test script to:
- correctly select emulations for targets using non-traditional MIPS
emulations,
- correctly select ABIs for targets that do not support all of them,
- use the default endianness selection where possible to benefit targets
that support only one,
- simplify test invocation by providing ABI-specific `run_dump_test'
wrappers, specifically `run_dump_test_o32', `run_dump_test_n32',
`run_dump_test_n64' and `run_dump_test_eabi', which remove the need to
use conditionals across the Expect script or to repeat ABI-specific
GAS and LD flags with each invocation,
removing numerous test failures for `mips-sgi-irix6', `mips64-openbsd',
`mips64el-openbsd' and `mips64el-ps2-elf' targets and broadening
coverage for several MIPS targets.
There are some new failures for the `mips64el-ps2-elf' target with tests
that were not previously run for that target:
FAIL: MIPS16 link branch to absolute expression (n32)
FAIL: MIPS16 link branch to absolute expression 1 (n32)
FAIL: MIPS16 link branch to absolute expression 2 (n32)
FAIL: microMIPS link branch to absolute expression (n32)
FAIL: MIPS ELF got reloc n32
FAIL: MIPS ELF xgot reloc n32
FAIL: undefined weak symbol overflow (n32)
FAIL: R_MIPS16_HI16 and R_MIPS16_LO16 relocs n32
FAIL: ld-mips-elf/attr-gnu-4-0-n32-ph
FAIL: ld-mips-elf/attr-gnu-4-1-n32-ph
FAIL: ld-mips-elf/attr-gnu-4-2-n32-ph
FAIL: ld-mips-elf/attr-gnu-4-3-n32-ph
FAIL: MIPSr6 JALR reloc unaligned/cross-mode link test (n32)
which are mostly due to dump discrepancies caused by mapping differences
coming from the default linker scripts used by these test cases, or
sometimes because of the specific MIPS processor architecture recorded
in the ELF file taking precedence over the general MIPS ISA level also
recorded. Finally, the R_MIPS16_HI16/R_MIPS16_LO16 relocation test
failure is a preexisting issue with the IRIX style emulation.
These failures will have to be addressed separately.
ld/
* testsuite/ld-mips-elf/mips-elf.exp (run_dump_test_abi)
(run_dump_test_o32, run_dump_test_n32, run_dump_test_n64)
(run_dump_test_eabi): New procedures.
(has_newabi, has_elf32): Remove variables.
(has_abi): New associative array variable.
(abi_asflags, abi_ldflags): Update settings across targets.
(irixemul): New variable.
Replace `run_dump_test' calls where applicable throughout with
`run_dump_test_o32', `run_dump_test_n32', `run_dump_test_n64'
and `run_dump_test_eabi' as appropriate. Remove explicit
passing of `abi_asflags' and `abi_ldflags'. Use `noarch' for
tests that require their own architecture setting. Force the
big endianness for tests that require it. Select the endianness
required for `objdump invocation with the `reloc-2' test.
Conditionalize tests run via `run_ld_link_tests' on the ABI
required and use the ABI list from the `has_abi' array where
appropriate.
* testsuite/ld-mips-elf/attr-gnu-4-0-n32-ph.d: Remove ABI and
endianness selection options from `ld' and `source' tags. Relax
output format matching.
* testsuite/ld-mips-elf/attr-gnu-4-0-n64-ph.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-1-n32-ph.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-1-n64-ph.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-2-n32-ph.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-2-n64-ph.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-3-n32-ph.d: Likewise.
* testsuite/ld-mips-elf/attr-gnu-4-3-n64-ph.d: Likewise.
* testsuite/ld-mips-elf/bal-jalx-addend-micromips-n32.d: Remove
ABI and endianness selection options from `as', `ld', `source'
tags, and also the `-march=from-abi' option. Remove the `as'
tag where it would become empty.
* testsuite/ld-mips-elf/bal-jalx-addend-micromips-n64.d:
Likewise.
* testsuite/ld-mips-elf/bal-jalx-addend-micromips.d: Likewise.
* testsuite/ld-mips-elf/bal-jalx-addend-n32.d: Likewise.
* testsuite/ld-mips-elf/bal-jalx-addend-n64.d: Likewise.
* testsuite/ld-mips-elf/bal-jalx-addend.d: Likewise.
* testsuite/ld-mips-elf/bal-jalx-local-micromips-n32.d:
Likewise.
* testsuite/ld-mips-elf/bal-jalx-local-micromips-n64.d:
Likewise.
* testsuite/ld-mips-elf/bal-jalx-local-micromips.d: Likewise.
* testsuite/ld-mips-elf/bal-jalx-local-n32.d: Likewise.
* testsuite/ld-mips-elf/bal-jalx-local-n64.d: Likewise.
* testsuite/ld-mips-elf/bal-jalx-local.d: Likewise.
* testsuite/ld-mips-elf/bal-jalx-pic-ignore-micromips-n32.d:
Likewise.
* testsuite/ld-mips-elf/bal-jalx-pic-ignore-micromips-n64.d:
Likewise.
* testsuite/ld-mips-elf/bal-jalx-pic-ignore-micromips.d:
Likewise.
* testsuite/ld-mips-elf/bal-jalx-pic-ignore-n32.d: Likewise.
* testsuite/ld-mips-elf/bal-jalx-pic-ignore-n64.d: Likewise.
* testsuite/ld-mips-elf/bal-jalx-pic-ignore.d: Likewise.
* testsuite/ld-mips-elf/bal-jalx-pic-micromips-n32.d: Likewise.
* testsuite/ld-mips-elf/bal-jalx-pic-micromips-n64.d: Likewise.
* testsuite/ld-mips-elf/bal-jalx-pic-micromips.d: Likewise.
* testsuite/ld-mips-elf/bal-jalx-pic-n32.d: Likewise.
* testsuite/ld-mips-elf/bal-jalx-pic-n64.d: Likewise.
* testsuite/ld-mips-elf/bal-jalx-pic.d: Likewise.
* testsuite/ld-mips-elf/branch-absolute-addend-n32.d: Likewise.
* testsuite/ld-mips-elf/branch-absolute-addend-n64.d: Likewise.
* testsuite/ld-mips-elf/branch-absolute-addend.d: Likewise.
* testsuite/ld-mips-elf/branch-absolute-n32.d: Likewise.
* testsuite/ld-mips-elf/branch-absolute-n64.d: Likewise.
* testsuite/ld-mips-elf/branch-absolute.d: Likewise.
* testsuite/ld-mips-elf/dyn-sec64.d: Likewise.
* testsuite/ld-mips-elf/eh-frame1-n32.d: Likewise.
* testsuite/ld-mips-elf/eh-frame1-n64.d: Likewise.
* testsuite/ld-mips-elf/eh-frame2-n32.d: Likewise.
* testsuite/ld-mips-elf/eh-frame2-n64.d: Likewise.
* testsuite/ld-mips-elf/elf-rel-got-n32-embed.d: Likewise.
* testsuite/ld-mips-elf/elf-rel-got-n32.d: Likewise.
* testsuite/ld-mips-elf/elf-rel-got-n64-embed.d: Likewise.
* testsuite/ld-mips-elf/elf-rel-got-n64-irix.d: Likewise.
* testsuite/ld-mips-elf/elf-rel-got-n64.d: Likewise.
* testsuite/ld-mips-elf/elf-rel-xgot-n32-embed.d: Likewise.
* testsuite/ld-mips-elf/elf-rel-xgot-n32.d: Likewise.
* testsuite/ld-mips-elf/elf-rel-xgot-n64-embed.d: Likewise.
* testsuite/ld-mips-elf/elf-rel-xgot-n64-irix.d: Likewise.
* testsuite/ld-mips-elf/elf-rel-xgot-n64.d: Likewise.
* testsuite/ld-mips-elf/emit-relocs-1.d: Likewise.
* testsuite/ld-mips-elf/got-dump-2.d: Likewise.
* testsuite/ld-mips-elf/got-page-2.d: Likewise.
* testsuite/ld-mips-elf/jal-global-overflow-0.d: Likewise.
* testsuite/ld-mips-elf/jal-global-overflow-1.d: Likewise.
* testsuite/ld-mips-elf/jal-local-overflow-0.d: Likewise.
* testsuite/ld-mips-elf/jal-local-overflow-1.d: Likewise.
* testsuite/ld-mips-elf/jalbal.d: Likewise.
* testsuite/ld-mips-elf/jalx-addend-n32.d: Likewise.
* testsuite/ld-mips-elf/jalx-addend-n64.d: Likewise.
* testsuite/ld-mips-elf/jalx-addend.d: Likewise.
* testsuite/ld-mips-elf/jalx-local-n32.d: Likewise.
* testsuite/ld-mips-elf/jalx-local-n64.d: Likewise.
* testsuite/ld-mips-elf/jalx-local.d: Likewise.
* testsuite/ld-mips-elf/jr-to-b-1.d: Likewise.
* testsuite/ld-mips-elf/jr-to-b-2.d: Likewise.
* testsuite/ld-mips-elf/lsi-4010-isa.d: Likewise.
* testsuite/ld-mips-elf/micromips-branch-absolute-addend-n32.d:
Likewise.
* testsuite/ld-mips-elf/micromips-branch-absolute-addend-n64.d:
Likewise.
* testsuite/ld-mips-elf/micromips-branch-absolute-addend.d:
Likewise.
* testsuite/ld-mips-elf/micromips-branch-absolute-n32.d:
Likewise.
* testsuite/ld-mips-elf/micromips-branch-absolute-n64.d:
Likewise.
* testsuite/ld-mips-elf/micromips-branch-absolute.d: Likewise.
* testsuite/ld-mips-elf/mips16-branch-2.d: Likewise.
* testsuite/ld-mips-elf/mips16-branch-3.d: Likewise.
* testsuite/ld-mips-elf/mips16-branch-absolute-1.d: Likewise.
* testsuite/ld-mips-elf/mips16-branch-absolute-2.d: Likewise.
* testsuite/ld-mips-elf/mips16-branch-absolute-addend-1.d:
Likewise.
* testsuite/ld-mips-elf/mips16-branch-absolute-addend-n32-1.d:
Likewise.
* testsuite/ld-mips-elf/mips16-branch-absolute-addend-n32.d:
Likewise.
* testsuite/ld-mips-elf/mips16-branch-absolute-addend-n64-1.d:
Likewise.
* testsuite/ld-mips-elf/mips16-branch-absolute-addend-n64.d:
Likewise.
* testsuite/ld-mips-elf/mips16-branch-absolute-addend.d:
Likewise.
* testsuite/ld-mips-elf/mips16-branch-absolute-n32-1.d:
Likewise.
* testsuite/ld-mips-elf/mips16-branch-absolute-n32-2.d:
Likewise.
* testsuite/ld-mips-elf/mips16-branch-absolute-n32.d: Likewise.
* testsuite/ld-mips-elf/mips16-branch-absolute-n64-1.d:
Likewise.
* testsuite/ld-mips-elf/mips16-branch-absolute-n64-2.d:
Likewise.
* testsuite/ld-mips-elf/mips16-branch-absolute-n64.d: Likewise.
* testsuite/ld-mips-elf/mips16-branch-absolute.d: Likewise.
* testsuite/ld-mips-elf/mips16-branch-addend-2.d: Likewise.
* testsuite/ld-mips-elf/mips16-branch-addend-3.d: Likewise.
* testsuite/ld-mips-elf/mips16-hilo-n32.d: Likewise.
* testsuite/ld-mips-elf/mips16-pcrel-0.d: Likewise.
* testsuite/ld-mips-elf/mips16-pcrel-1.d: Likewise.
* testsuite/ld-mips-elf/mips16-pcrel-addend-2.d: Likewise.
* testsuite/ld-mips-elf/mips16-pcrel-addend-6.d: Likewise.
* testsuite/ld-mips-elf/mips16-pcrel-n32-0.d: Likewise.
* testsuite/ld-mips-elf/mips16-pcrel-n32-1.d: Likewise.
* testsuite/ld-mips-elf/mips16-pcrel-n64-sym32-0.d: Likewise.
* testsuite/ld-mips-elf/mips16-pcrel-n64-sym32-1.d: Likewise.
* testsuite/ld-mips-elf/mips16e2-pcrel-0.d: Likewise.
* testsuite/ld-mips-elf/mips16e2-pcrel-1.d: Likewise.
* testsuite/ld-mips-elf/mips16e2-pcrel-addend-2.d: Likewise.
* testsuite/ld-mips-elf/mips16e2-pcrel-addend-6.d: Likewise.
* testsuite/ld-mips-elf/mips16e2-pcrel-n32-0.d: Likewise.
* testsuite/ld-mips-elf/mips16e2-pcrel-n32-1.d: Likewise.
* testsuite/ld-mips-elf/mips16e2-pcrel-n64-sym32-0.d: Likewise.
* testsuite/ld-mips-elf/mips16e2-pcrel-n64-sym32-1.d: Likewise.
* testsuite/ld-mips-elf/multi-got-1.d: Likewise.
* testsuite/ld-mips-elf/multi-got-hidden-1.d: Likewise.
* testsuite/ld-mips-elf/multi-got-hidden-2.d: Likewise.
* testsuite/ld-mips-elf/multi-got-no-shared.d: Likewise.
* testsuite/ld-mips-elf/no-shared-1-n32.d: Likewise.
* testsuite/ld-mips-elf/no-shared-1-n64.d: Likewise.
* testsuite/ld-mips-elf/no-shared-1-o32.d: Likewise.
* testsuite/ld-mips-elf/pic-and-nonpic-2.d: Likewise.
* testsuite/ld-mips-elf/pic-and-nonpic-3-error.d: Likewise.
* testsuite/ld-mips-elf/pic-and-nonpic-4-error.d: Likewise.
* testsuite/ld-mips-elf/pie-n32.d: Likewise.
* testsuite/ld-mips-elf/pie-n64.d: Likewise.
* testsuite/ld-mips-elf/pie-o32.d: Likewise.
* testsuite/ld-mips-elf/rel32-n32.d: Likewise.
* testsuite/ld-mips-elf/rel32-o32.d: Likewise.
* testsuite/ld-mips-elf/rel64.d: Likewise.
* testsuite/ld-mips-elf/relax-jalr-n32.d: Likewise.
* testsuite/ld-mips-elf/reloc-1-n32.d: Likewise.
* testsuite/ld-mips-elf/reloc-1-n64.d: Likewise.
* testsuite/ld-mips-elf/reloc-2.d: Likewise.
* testsuite/ld-mips-elf/reloc-3-n32.d: Likewise.
* testsuite/ld-mips-elf/reloc-local-overflow.d: Likewise.
* testsuite/ld-mips-elf/textrel-1.d: Likewise.
* testsuite/ld-mips-elf/unaligned-branch-2.d: Likewise.
* testsuite/ld-mips-elf/unaligned-branch-ignore-2.d: Likewise.
* testsuite/ld-mips-elf/unaligned-branch-ignore-micromips.d:
Likewise.
* testsuite/ld-mips-elf/unaligned-branch-ignore-mips16.d:
Likewise.
* testsuite/ld-mips-elf/unaligned-branch-ignore-r6-1.d:
Likewise.
* testsuite/ld-mips-elf/unaligned-branch-micromips.d: Likewise.
* testsuite/ld-mips-elf/unaligned-branch-mips16.d: Likewise.
* testsuite/ld-mips-elf/unaligned-branch-r6-1.d: Likewise.
* testsuite/ld-mips-elf/unaligned-branch-r6-2.d: Likewise.
* testsuite/ld-mips-elf/unaligned-branch.d: Likewise.
* testsuite/ld-mips-elf/unaligned-jalx-addend-0.d: Likewise.
* testsuite/ld-mips-elf/unaligned-jalx-addend-1.d: Likewise.
* testsuite/ld-mips-elf/unaligned-jalx-addend-2.d: Likewise.
* testsuite/ld-mips-elf/unaligned-jalx-addend-3.d: Likewise.
* testsuite/ld-mips-elf/unaligned-jalx-addend-micromips-0.d:
Likewise.
* testsuite/ld-mips-elf/unaligned-jalx-addend-micromips-1.d:
Likewise.
* testsuite/ld-mips-elf/unaligned-jalx-addend-mips16-0.d:
Likewise.
* testsuite/ld-mips-elf/unaligned-jalx-addend-mips16-1.d:
Likewise.
* testsuite/ld-mips-elf/unaligned-jump-micromips.d: Likewise.
* testsuite/ld-mips-elf/unaligned-jump-mips16.d: Likewise.
* testsuite/ld-mips-elf/unaligned-jump.d: Likewise.
* testsuite/ld-mips-elf/unaligned-ldpc-0.d: Likewise.
* testsuite/ld-mips-elf/unaligned-ldpc-1.d: Likewise.
* testsuite/ld-mips-elf/unaligned-lwpc-0.d: Likewise.
* testsuite/ld-mips-elf/unaligned-lwpc-1.d: Likewise.
170 lines
3.5 KiB
D
170 lines
3.5 KiB
D
#source: reloc-2a.s
|
|
#source: reloc-2b.s
|
|
#ld: --oformat=srec -Treloc-2.ld
|
|
#objdump: -D -mmips:4000
|
|
|
|
.*: file format .*
|
|
|
|
Disassembly of section .*:
|
|
|
|
.* <.*>:
|
|
#
|
|
# Relocations against tstarta
|
|
#
|
|
.*: 3c040020 lui a0,0x20
|
|
.*: 2484fff0 addiu a0,a0,-16
|
|
.*: 3c040020 lui a0,0x20
|
|
.*: 24840000 addiu a0,a0,0
|
|
.*: 3c040021 lui a0,0x21
|
|
.*: 24848000 addiu a0,a0,-32768
|
|
.*: 3c040021 lui a0,0x21
|
|
.*: 2484fff0 addiu a0,a0,-16
|
|
.*: 3c040021 lui a0,0x21
|
|
.*: 24840010 addiu a0,a0,16
|
|
#
|
|
# Relocations against t32a
|
|
#
|
|
.*: 3c040020 lui a0,0x20
|
|
.*: 24840010 addiu a0,a0,16
|
|
.*: 3c040020 lui a0,0x20
|
|
.*: 24840020 addiu a0,a0,32
|
|
.*: 3c040021 lui a0,0x21
|
|
.*: 24848020 addiu a0,a0,-32736
|
|
.*: 3c040021 lui a0,0x21
|
|
.*: 24840010 addiu a0,a0,16
|
|
.*: 3c040021 lui a0,0x21
|
|
.*: 24840030 addiu a0,a0,48
|
|
#
|
|
# Relocations against _start
|
|
#
|
|
.*: 3c040020 lui a0,0x20
|
|
.*: 2484fff0 addiu a0,a0,-16
|
|
.*: 3c040020 lui a0,0x20
|
|
.*: 24840000 addiu a0,a0,0
|
|
.*: 3c040021 lui a0,0x21
|
|
.*: 24848000 addiu a0,a0,-32768
|
|
.*: 3c040021 lui a0,0x21
|
|
.*: 2484fff0 addiu a0,a0,-16
|
|
.*: 3c040021 lui a0,0x21
|
|
.*: 24840010 addiu a0,a0,16
|
|
#
|
|
# Relocations against sdg
|
|
#
|
|
.*: 2484edd8 addiu a0,a0,-4648
|
|
.*: 2484eddc addiu a0,a0,-4644
|
|
.*: 2484ede0 addiu a0,a0,-4640
|
|
#
|
|
# Relocations against sdla
|
|
#
|
|
.*: 2484edd8 addiu a0,a0,-4648
|
|
.*: 2484eddc addiu a0,a0,-4644
|
|
.*: 2484ede0 addiu a0,a0,-4640
|
|
#
|
|
# Relocations against tstarta
|
|
#
|
|
.*: 0c081fff jal 0x207ffc
|
|
.*: 00000000 nop
|
|
.*: 0c082000 jal 0x208000
|
|
.*: 00000000 nop
|
|
.*: 0c082001 jal 0x208004
|
|
.*: 00000000 nop
|
|
#
|
|
# Relocations against t32a
|
|
#
|
|
.*: 0c082007 jal 0x20801c
|
|
.*: 00000000 nop
|
|
.*: 0c082008 jal 0x208020
|
|
.*: 00000000 nop
|
|
.*: 0c082009 jal 0x208024
|
|
.*: 00000000 nop
|
|
#
|
|
# Relocations against _start
|
|
#
|
|
.*: 0c081fff jal 0x207ffc
|
|
.*: 00000000 nop
|
|
.*: 0c082000 jal 0x208000
|
|
.*: 00000000 nop
|
|
.*: 0c082001 jal 0x208004
|
|
.*: 00000000 nop
|
|
\.\.\.
|
|
#
|
|
# Relocations against tstartb
|
|
#
|
|
.*: 3c040021 lui a0,0x21
|
|
.*: 2484ffe0 addiu a0,a0,-32
|
|
.*: 3c040021 lui a0,0x21
|
|
.*: 2484fff0 addiu a0,a0,-16
|
|
.*: 3c040021 lui a0,0x21
|
|
.*: 24847ff0 addiu a0,a0,32752
|
|
.*: 3c040022 lui a0,0x22
|
|
.*: 2484ffe0 addiu a0,a0,-32
|
|
.*: 3c040022 lui a0,0x22
|
|
.*: 24840000 addiu a0,a0,0
|
|
#
|
|
# Relocations against t32b
|
|
#
|
|
.*: 3c040021 lui a0,0x21
|
|
.*: 24840000 addiu a0,a0,0
|
|
.*: 3c040021 lui a0,0x21
|
|
.*: 24840010 addiu a0,a0,16
|
|
.*: 3c040022 lui a0,0x22
|
|
.*: 24848010 addiu a0,a0,-32752
|
|
.*: 3c040022 lui a0,0x22
|
|
.*: 24840000 addiu a0,a0,0
|
|
.*: 3c040022 lui a0,0x22
|
|
.*: 24840020 addiu a0,a0,32
|
|
#
|
|
# Relocations against _start
|
|
#
|
|
.*: 3c040020 lui a0,0x20
|
|
.*: 2484fff0 addiu a0,a0,-16
|
|
.*: 3c040020 lui a0,0x20
|
|
.*: 24840000 addiu a0,a0,0
|
|
.*: 3c040021 lui a0,0x21
|
|
.*: 24848000 addiu a0,a0,-32768
|
|
.*: 3c040021 lui a0,0x21
|
|
.*: 2484fff0 addiu a0,a0,-16
|
|
.*: 3c040021 lui a0,0x21
|
|
.*: 24840010 addiu a0,a0,16
|
|
#
|
|
# Relocations against sdg
|
|
#
|
|
.*: 2484edd8 addiu a0,a0,-4648
|
|
.*: 2484eddc addiu a0,a0,-4644
|
|
.*: 2484ede0 addiu a0,a0,-4640
|
|
#
|
|
# Relocations against sdl2
|
|
#
|
|
.*: 2484edf8 addiu a0,a0,-4616
|
|
.*: 2484edfc addiu a0,a0,-4612
|
|
.*: 2484ee00 addiu a0,a0,-4608
|
|
#
|
|
# Relocations against tstartb
|
|
#
|
|
.*: 0c085ffb jal 0x217fec
|
|
.*: 00000000 nop
|
|
.*: 0c085ffc jal 0x217ff0
|
|
.*: 00000000 nop
|
|
.*: 0c085ffd jal 0x217ff4
|
|
.*: 00000000 nop
|
|
#
|
|
# Relocations against t32b
|
|
#
|
|
.*: 0c086003 jal 0x21800c
|
|
.*: 00000000 nop
|
|
.*: 0c086004 jal 0x218010
|
|
.*: 00000000 nop
|
|
.*: 0c086005 jal 0x218014
|
|
.*: 00000000 nop
|
|
#
|
|
# Relocations against _start
|
|
#
|
|
.*: 0c081fff jal 0x207ffc
|
|
.*: 00000000 nop
|
|
.*: 0c082000 jal 0x208000
|
|
.*: 00000000 nop
|
|
.*: 0c082001 jal 0x208004
|
|
.*: 00000000 nop
|
|
\.\.\.
|
|
#pass
|