]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Reinstate the ASLR and DEP linker flags on Windows.
authorSimon Tatham <anakin@pobox.com>
Sat, 21 Jan 2017 14:55:53 +0000 (14:55 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 21 Jan 2017 14:55:53 +0000 (14:55 +0000)
Originally added in commit 0014ffb70, and promptly reverted in
6bea4b250 when we realised that VS2003 didn't actually understand
them. But now we're building with VS2015, which does understand them,
it's actually useful to put them back in again.

Looking more closely, it turns out that VS2003 didn't actually _fail
to build_ if you passed these flags on the linker command line - it
just printed a warning and ignored them. (So there was no actual need
to revert the original change, except that it would have caused
confusion.) But that means I can add them unconditionally now, without
breaking even the legacy VS2003 build.

mkfiles.pl

index 55ab7b30aebacdb8293a1653207422396ed5d02f..3e42c7345edbdce39494b157dfee958653267497 100755 (executable)
@@ -646,7 +646,7 @@ if (defined $makefiles{'vc'}) {
       "CFLAGS = /nologo /W3 /O1 " .
       (join " ", map {"-I$dirpfx$_"} @srcdirs) .
       " /D_WINDOWS /D_WIN32_WINDOWS=0x500 /DWINVER=0x500 /D_CRT_SECURE_NO_WARNINGS\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".