[PATCH] ld: Unify the directory separator on Windows.

Maciej W. Rozycki macro@orcam.me.uk
Sun Jul 26 04:23:52 GMT 2026


On Wed, 22 Jul 2026, Jan Dubiec wrote:

> diff --git a/ld/ldfile.c b/ld/ldfile.c
> index f47e860d437..00fe1d90d44 100644
> --- a/ld/ldfile.c
> +++ b/ld/ldfile.c
> @@ -47,12 +47,8 @@ search_dirs_type *search_head;
>  #ifdef VMS
>  static char *slash = "";
>  #else
> -#if defined (_WIN32) && !defined (__CYGWIN32__)
> -static char *slash = "\\";
> -#else
>  static char *slash = "/";
>  #endif
> -#endif

 I think this needs to be complemented with a corresponding update to the 
testsuite, now that a backslash is no longer expected to be there.  Here 
is a list of files affected AFAICT:

ld/testsuite/ld-elf/retain5.map
ld/testsuite/ld-plugin/plugin-10.d
ld/testsuite/ld-plugin/plugin-11.d
ld/testsuite/ld-plugin/plugin-18.d
ld/testsuite/ld-plugin/plugin-19.d
ld/testsuite/ld-plugin/plugin-20.d
ld/testsuite/ld-plugin/plugin-22.d

Would you please try and fix them since you've got the right environment 
to verify such a change?

  Maciej


More information about the Binutils mailing list