mingw: use ASLR, no-SEH and DEP if available
If the linker supports the flags --dynamicbase, --no-seh, or --nxcompat, use them. Tested on Windows Vista: Process Explorer reports that ASLR and DEP are in use. No effect seen on Wine or Windows XP. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
ebab1720f6
commit
952afb719f
9
configure
vendored
9
configure
vendored
@ -2141,6 +2141,15 @@ if test "$solaris" = "no" ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Use ASLR, no-SEH and DEP if available
|
||||
if test "$mingw32" = "yes" ; then
|
||||
for flag in --dynamicbase --no-seh --nxcompat; do
|
||||
if $ld --help 2>/dev/null | grep ".$flag" >/dev/null 2>/dev/null ; then
|
||||
LDFLAGS="-Wl,$flag $LDFLAGS"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
confdir=$sysconfdir$confsuffix
|
||||
|
||||
tools=
|
||||
|
Loading…
Reference in New Issue
Block a user