]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Enable DEP and ASLR flags on VC++ linker command line
authorOwen Dunn <owen@greenend.org.uk>
Tue, 24 Nov 2015 22:57:46 +0000 (22:57 +0000)
committerOwen Dunn <owen@greenend.org.uk>
Tue, 24 Nov 2015 22:57:46 +0000 (22:57 +0000)
/dynamicbase and /nxcompat on the VC linker command line should
enable DEP and ASLR according to this MSDN article.
https://msdn.microsoft.com/en-us/library/bb430720.aspx

mkfiles.pl

index 59ecfdc4952b6a033e55287cecf062e66b8f268e..90e4f9dc1b9747fd099934de40fe59b72946ccdb 100755 (executable)
@@ -636,7 +636,7 @@ if (defined $makefiles{'vc'}) {
       "CFLAGS = /nologo /W3 /O1 " .
       (join " ", map {"-I$dirpfx$_"} @srcdirs) .
       " /D_WINDOWS /D_WIN32_WINDOWS=0x500 /DWINVER=0x500\n".
-      "LFLAGS = /incremental:no /fixed\n".
+      "LFLAGS = /incremental:no /dynamicbase /nxcompat\n".
       "RCFLAGS = ".(join " ", map {"-I$dirpfx$_"} @srcdirs).
       " -DWIN32 -D_WIN32 -DWINVER=0x0400\n".
       "\n".