[x264-devel] Windows: Enable DEP and ASLR

Henrik Gramner git at videolan.org
Wed Feb 27 00:18:03 CET 2013


x264 | branch: master | Henrik Gramner <henrik at gramner.com> | Sun Jan 20 19:35:06 2013 +0100| [486ff39f398401d126fbf0379287b1a7ca7fae6e] | committer: Jason Garrett-Glaser

Windows: Enable DEP and ASLR

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=486ff39f398401d126fbf0379287b1a7ca7fae6e
---

 configure |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/configure b/configure
index cb8f669..4d663aa 100755
--- a/configure
+++ b/configure
@@ -564,6 +564,7 @@ case $host_cpu in
         elif [ "$SYS" = WINDOWS -o "$SYS" = CYGWIN ]; then
             ASFLAGS="$ASFLAGS -f win32 -DPREFIX"
             LDFLAGS="$LDFLAGS -Wl,--large-address-aware"
+            [ $compiler = GNU ] && LDFLAGS="$LDFLAGS -Wl,--nxcompat -Wl,--dynamicbase"
             [ $compiler = GNU ] && RCFLAGS="--target=pe-i386 $RCFLAGS"
         else
             ASFLAGS="$ASFLAGS -f elf"
@@ -583,6 +584,7 @@ case $host_cpu in
             ASFLAGS="$ASFLAGS -f win32 -m amd64"
             # only the GNU toolchain is inconsistent in prefixing function names with _
             [ $compiler = GNU ] && cc_check "" "-S" && grep -q "_main:" conftest && ASFLAGS="$ASFLAGS -DPREFIX"
+            [ $compiler = GNU ] && LDFLAGS="$LDFLAGS -Wl,--nxcompat -Wl,--dynamicbase"
             [ $compiler = GNU ] && RCFLAGS="--target=pe-x86-64 $RCFLAGS"
         else
             ASFLAGS="$ASFLAGS -f elf -m amd64"



More information about the x264-devel mailing list