在 2022-12-17 22:22, Pali Rohár 写道:
Currently when linking target application with LTO builds of mingw-w64
libraries, it is needed to manually specify entry point of mingw-w64 crt
startup function via linker flag -Wl,-e,_mainCRTStartup (for console
executables) or -Wl,-e,_WinMainCRTStartup (for GUI executables) or
-Wl,-e,_DllMainCRTStartup@12 (for DLL libraries). Otherwise LTO compiler
drops startup function generates output binary totally broken and
non-working (executable crashes during during startup).



Wouldn't this cause executables to contain all three entry-point functions, which I think should be avoided?



--
Best regards,
LIU Hao

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to