Reputation: 892
When using mingw, the compiler adds a lot of version strings in the .rdata
section. For instance in linux:
GCC: (Gentoo Hardened 4.8.1-r1 p1.2, pie-0.5.7) 4.8.1
GCC: (Gentoo Hardened 4.8.1-r1 p1.2, pie-0.5.7) 4.8.1
GCC: (Gentoo Hardened 4.8.1-r1 p1.2, pie-0.5.7) 4.8.1
...
Or in windows:
GCC: (GNU) 4.8.1
GCC: (GNU) 4.8.1
GCC: (GNU) 4.8.1
...
Is there a way to remove them, or at least to put them into a separate section (such as .comment)?
Thanks!
Upvotes: 3
Views: 861
Reputation: 27768
propper solution: recompile your toolchain without --with-pkgversion
flag.
hacky solution: open g++
in hex editor, find said string, replace with 0x00
s
Upvotes: 2