[PATCH] ld: Fix a H8/300 specific test case
Maciej W. Rozycki
macro@orcam.me.uk
Mon Nov 10 18:42:23 GMT 2025
On Mon, 10 Nov 2025, Jan Dubiec wrote:
> > It works here for me on Linux.
> That's really strange. Here is the log from my Ubuntu 24.04.2 running on
> VirtualBox:
>
> /mnt/Works/xcomp/build-binutils-h8300-linux/ld/../gas/as-new -o
> tmpdir/relax-7?.o /mnt/Works/binutils/ld/testsuite/ld-h8300/relax-7?.s
> Executing on host: sh -c
> {/mnt/Works/xcomp/build-binutils-h8300-linux/ld/../gas/as-new -o
> tmpdir/relax-7?.o /mnt/Works/binutils/ld/testsuite/ld-h8300/relax-7?.s 2>&1}
> /dev/null dump.tmp (timeout = 300)
> spawn [open ...]
> Assembler messages:
> Fatal error: can't create tmpdir/relax-7?.o: No such file or directory
> failed with: <Assembler messages:
> Fatal error: can't create tmpdir/relax-7?.o: No such file or directory>, no
> expected output
> FAIL: H8300 Relaxation Test 7
It seems like an underlying filesystem issue, i.e. the inability to make
a file with a `?' character in the name, just as the error message says.
Here it works just fine too:
.../h8300-elf/ld/../gas/as-new -o tmpdir/relax-7?.o .../binutils-src/ld/testsuite/ld-h8300/relax-7?.s
Executing on host: sh -c {.../h8300-elf/ld/../gas/as-new -o tmpdir/relax-7?.o .../binutils-src/ld/testsuite/ld-h8300/relax-7?.s 2>&1} /dev/null dump.tmp (timeout = 300)
spawn [open ...]
./ld-new -L.../binutils-src/ld/testsuite/ld-h8300 --relax -m h8300self -o tmpdir/dump tmpdir/relax-7?.o
Executing on host: sh -c {./ld-new -L.../binutils-src/ld/testsuite/ld-h8300 --relax -m h8300self -o tmpdir/dump tmpdir/relax-7?.o 2>&1} /dev/null dump.tmp (timeout = 300)
spawn [open ...]
.../h8300-elf/ld/../binutils/objdump -d -s --no-show-raw-insn tmpdir/dump > tmpdir/dump.out
Executing on host: sh -c {.../h8300-elf/ld/../binutils/objdump -d -s --no-show-raw-insn tmpdir/dump > tmpdir/dump.out 2>dump.tmp} /dev/null (timeout = 300)
spawn [open ...]
PASS: H8300 Relaxation Test 7
(which is a `powerpc64le-linux-gnu' build/host system) with GAS combining
input from relax-7a.s and relax-7b.s into assembly output in relax-7?.o.
I find this usage a little odd, but nothing wrong with it in principle.
The fix is fine though, there's no point in carrying the oddity along if
it's causing issues.
> It looks virtually the same as the log from Windows/MSYS2. I'm using DejaGnu
> 1.6.3 and bash 5.2.21, but I don't think that this is an issue related to
> these tools. Perhaps you are using a modified version of run_dump_test & Co?
Well, Alan is a long-time binutils general maintainer and has been around
for 30+ years. He surely knows how to use this stuff.
Maciej
More information about the Binutils
mailing list