https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121733
--- Comment #7 from Pali Rohár <pali at kernel dot org> --- Created attachment 65575 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65575&action=edit mingw-w64 disable __main injection I have checked that defining the HAS_INIT_SECTION disables injection of calling __main into the main function. In the attachment is a patch which defines it for mingw-w64 targets. I see that for djgpp target is defined same thing.
