-
-
Notifications
You must be signed in to change notification settings - Fork 224
Description
Hi,
Currently, when using -fstack-protector
with mingw clang, it will link to libssp and libssp_nonshared, even though SSP is already implemented in mingw crt. llvm-mingw seems to generate empty .a files to fix this, but toolchains built in other ways do not do this, and results in stack protector not being ready to use out of the box.
Additionally, if set MajorSubsystemVersion to 10, exe will fail to run because mingw does not support SecurityCookie.
I noticed that mingw used to have something related to SecurityCookie, but it was later removed (because it was incomplete ?). Perhaps consider re-add a complete SecurityCookie implementation to allow using SecurityCookie instead of ssp. This way, clang can expose a new option to use SecurityCookie without linking to libssp (because it's new), and it can allow exe compatible with major-subsystem-version=10.