on .elf formats, there is a .comment section that includes compiler & linker names and versions, this is fine since its discardable via editing the linker scripts
However on Windows .exe's, while using MinGW, there is no comment section and these are put in the .rdata section as actual program strings (a lot too, about 50 copies) and I cannot get rid of these like so. They are presumably added from the CRT during linkage as they aren't present in the assembly output pre-link.
Is there a way to do this effectively on .exes too? Or do I have to remove them from source and compile mingw gcc myself? And if that's the case I would really appriceate some help
Here's what the "version texts" look like:
GCC: (GNU) 15.2.0
Things I've tried
- Using the strip utils
- fno-ident
- Tampering with the Windows linker scripts (they also aren't there)
- compiling gcc with the
--with-pkgversion=versionparameter empty, this only removes the "GNU" inside the brackets