Using strip on multiple files using wildcards fails since Binutils 2.44

Jan Beulich jbeulich@suse.com
Mon Feb 24 10:15:25 GMT 2025


On 23.02.2025 11:02, Markus Eisenmann wrote:
> I'm using MinGW64 and since the latest update to Binutils 2.44 a command like
> 
>   *
> strip strip --strip-unneeded -w -p "prefix-*.exe"
> 
> failes with
> strip: 'prefix-*.exe': No such file

Is it possible that you updated more than just binutils? In UNIX-like
environments it's normally the shell, not individual tools which expand
wildcards (DOS / Windows often have startup code provided by the library
to achieve the same, if so intended). And it only ought to do so when
the wildcard isn't quoted, i.e. the above not working looks correct to
me (and hence there may have been a bug fix elsewhere).

Try

strip --strip-unneeded -w -p prefix-*.exe

and for comparison

ls prefix-*.exe
ls "prefix-*.exe"

> FYI: I've not checked whether this has also changed for the Linux variant.

All of the above on the assumption that MinGW aims at emulating Unix
behavior here, nor Windows cmd.exe one.

Jan

> Is this a regression or was the usage of a wildcard file-pattern never intended?
> 
> Best regards from Salzburg,
> Markus
> 



More information about the Binutils mailing list