diff options
author | Alan Modra <amodra@gmail.com> | 2023-02-17 13:50:18 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2023-02-17 15:19:47 +1030 |
commit | 5f497256bee624f0fa470949aa41534093bc5b25 (patch) | |
tree | f053c64cc71e375831927604a905fa95a858e059 /binutils | |
parent | 75092c693dc1325d222d25e0eb3ac7e24b2f16ad (diff) | |
download | binutils-5f497256bee624f0fa470949aa41534093bc5b25.zip binutils-5f497256bee624f0fa470949aa41534093bc5b25.tar.gz binutils-5f497256bee624f0fa470949aa41534093bc5b25.tar.bz2 |
ld test asciz and ascii fails
Fix these fails:
alpha-dec-vms +FAIL: ld-scripts/asciz
alpha-dec-vms +FAIL: ld-scripts/ascii
i386-go32 +FAIL: ld-scripts/asciz
sh-coff +FAIL: ld-scripts/asciz
It's better to positively select targets for .section support than to
try to exclude all targets that don't. Make a new is_coff_format so
we can easily select such.
binutils/
* testsuite/lib/binutils-common.exp (is_coff_format): New.
ld/
* testsuite/ld-scripts/ascii.d: Use is_elf_format and
is_coff_format to select targets, exclude ti coff.
* testsuite/ld-scripts/asciz.d: Likewise. Accept trailing zeros.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/testsuite/lib/binutils-common.exp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp index b0190ac..ab75241 100644 --- a/binutils/testsuite/lib/binutils-common.exp +++ b/binutils/testsuite/lib/binutils-common.exp @@ -112,6 +112,21 @@ proc is_pecoff_format args { return 0 } +# True if the object format is known to COFF or PE (but not ECOFF or XCOFF) +# +proc is_coff_format {} { + if { [is_pecoff_format] + || [istarget *-*-coff*] + || [istarget *-*-go32*] + || [istarget *-*-msdosdjgpp*] + || [istarget tic4x-*-*] + || [istarget tic54x-*-*] + || [istarget z8k-*-*] } { + return 1 + } + return 0 +} + proc is_som_format {} { if { ![istarget hppa*-*-*] || [istarget hppa*64*-*-*] } { return 0; |