Commit 5e0fca86 authored by Henrik Gramner's avatar Henrik Gramner Committed by Fiona Glaser
Browse files

Windows: Enable DEP and ASLR

parent 5ec5c789
...@@ -564,6 +564,7 @@ case $host_cpu in ...@@ -564,6 +564,7 @@ case $host_cpu in
elif [ "$SYS" = WINDOWS -o "$SYS" = CYGWIN ]; then elif [ "$SYS" = WINDOWS -o "$SYS" = CYGWIN ]; then
ASFLAGS="$ASFLAGS -f win32 -DPREFIX" ASFLAGS="$ASFLAGS -f win32 -DPREFIX"
LDFLAGS="$LDFLAGS -Wl,--large-address-aware" LDFLAGS="$LDFLAGS -Wl,--large-address-aware"
[ $compiler = GNU ] && LDFLAGS="$LDFLAGS -Wl,--nxcompat -Wl,--dynamicbase"
[ $compiler = GNU ] && RCFLAGS="--target=pe-i386 $RCFLAGS" [ $compiler = GNU ] && RCFLAGS="--target=pe-i386 $RCFLAGS"
else else
ASFLAGS="$ASFLAGS -f elf" ASFLAGS="$ASFLAGS -f elf"
...@@ -583,6 +584,7 @@ case $host_cpu in ...@@ -583,6 +584,7 @@ case $host_cpu in
ASFLAGS="$ASFLAGS -f win32 -m amd64" ASFLAGS="$ASFLAGS -f win32 -m amd64"
# only the GNU toolchain is inconsistent in prefixing function names with _ # 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 ] && 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" [ $compiler = GNU ] && RCFLAGS="--target=pe-x86-64 $RCFLAGS"
else else
ASFLAGS="$ASFLAGS -f elf -m amd64" ASFLAGS="$ASFLAGS -f elf -m amd64"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment