https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97574
--- Comment #4 from Tamar Christina <tnfchris at gcc dot gnu.org> --- Submitted a patch to get the driver to stop mangling nul so it makes it easier for binutils to detect. That said Jonathan is right in that there's still a binutils bug here. I had forgotten that even though MSDN recommends against using extensions with special filenames that it's not an error. It looks like binutils is failing in bfd_close, looks like it's using stat to detect special files, however on windows stat("nul") seems to be returning _S_IFREG. You'll need to report a ticker there for this. I'll leave this open since the nul device shouldn't get an extension.