[PATCH] ld: testsuite: Fix a few backslash-related issues on MinGW.

Maciej W. Rozycki macro@orcam.me.uk
Fri Jul 17 14:05:38 GMT 2026


On Fri, 17 Jul 2026, Jan Dubiec wrote:

> >   Seconded: what's the root cause, i.e. where does the backslash exactly
> > come from?
> From the linker. It is invoked as follows:
> /d/Works/xcomp/build-binutils-h8300-mingw/ld/ld-new    -o tmpdir/absc
> -L/d/Works/binutils/ld/testsuite/ld-archive -e ff tmpdir/abc.o
> /d/Works/binutils/ld/testsuite/ld-archive/ab.t --verbose --print-map
> 
> For each library listed in ld/testsuite/ld-archive/ab.t, the linker takes the
> library name, prepends the library search path specified with the -L option,
> inserting a "\" between them, and then attempts to open the resulting file. If
> that fails, it falls back to using the relative file name instead. It's all in
> the log:

 This doesn't answer my question; we know from your report that it happens 
"somewhere in the linker" already.  Please point me at the source code 
line this happens at.  I have no MinGW host system available to track it 
down myself.

  Maciej


More information about the Binutils mailing list