ld test asciz and ascii fails
authorAlan Modra <amodra@gmail.com>
Fri, 17 Feb 2023 03:20:18 +0000 (13:50 +1030)
committerAlan Modra <amodra@gmail.com>
Fri, 17 Feb 2023 04:49:47 +0000 (15:19 +1030)
commit5f497256bee624f0fa470949aa41534093bc5b25
treef053c64cc71e375831927604a905fa95a858e059
parent75092c693dc1325d222d25e0eb3ac7e24b2f16ad
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.
binutils/testsuite/lib/binutils-common.exp
ld/testsuite/ld-scripts/ascii.d
ld/testsuite/ld-scripts/asciz.d