[PATCH] ld: Fix a H8/300 specific test case

Maciej W. Rozycki macro@orcam.me.uk
Tue Nov 11 20:48:59 GMT 2025


On Tue, 11 Nov 2025, Jan Dubiec wrote:

> > No, everything standard here.
> > 
> > I can run the following without error from the command line.
> > ../gas/as-new -o tmpdir/relax-7\?.o
> > /home/alan/src/binutils-gdb/ld/testsuite/ld-h8300/relax-7?.s
> > (And without the backslash if I remove the new tmpdir/relax-7a.o and
> > tmpdir/relax-7b.o)
> > 
> > Perhaps it is a filesystem restriction for you?
> > 
> Indeed, my source and build directories are on a NTFS volume where ? is one of
> the "special characters". But this raises questions. How should the test case
> really work, i.e. what should do the globbing – the test suite (e.g.
> run_dump_test) or gas? What was the author's (Nick Clifton's AFAIR) intention?

 Patch was by Michael Schewe, Nick has only committed it on Michael's 
behalf.  For some reason the original submission is missing from archives: 
<https://inbox.sourceware.org/binutils/514B2F77.7010809@redhat.com/> -- 
there's only Nick's reply there and a follow-up discussion (same with the 
other two mailing list archives).

 I have a copy of the message in my personal archive, but there's little 
explanation there:

On Mon, 18 Mar 2013, Michael Schewe wrote:

> Hi h8300 Maintainers,
> 
> Attached is a patch for Renesas h8300 architecture which adds relaxation for
> mov.b/w/l @(disp:32, ERx) -> mov.b/w/l @(disp:16, ERx) when possible, in ELF
> object file format.
> Please review and apply. I have added some test cases and did real-world tests
> on a project in the last 6 weeks, it works fine for me.
> 
> regards,
> Michael

 There are ways to do globbing in TCL, such as the `glob' procedure, but 
our test framework makes no use of them here and filenames are passed down 
verbatim.  Since a shell is used to run the tools it's the shell's duty to 
expand any globbing on the filenames received.  If no file matches, then 
any glob characters are passed as is to the tool invoked and consequently 
the underlying OS; tools do not do any command line expansion.

 As I say this is an odd case, I wouldn't have written a test case this 
way and I appreciate your clean-up just as Alan does.

 HTH,

  Maciej


More information about the Binutils mailing list