Enable DEP and ASLR.

This commit is contained in:
rockihack 2017-03-03 22:56:52 +01:00 committed by Janek Bevendorff
parent a58f84a1ff
commit 1984595d0d
No known key found for this signature in database
GPG Key ID: CFEC2F6850BFFA53

View File

@ -127,6 +127,8 @@ if(MINGW)
set(CMAKE_RC_COMPILER_INIT windres)
enable_language(RC)
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
# Enable DEP and ASLR
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--nxcompat -Wl,--dynamicbase")
link_libraries(ws2_32 wsock32)
endif()