build: supply `-Wl,--high-entropy-va`

This should enable high-entropy ASLR on 64-bit targets, for better
mitigation of exploits.
This commit is contained in:
Wladimir J. van der Laan 2016-06-23 16:54:28 +02:00 committed by Jack Grigg
parent 41b28420d2
commit 8a932154c5
No known key found for this signature in database
GPG Key ID: 665DBCD284F7DAFF
1 changed files with 1 additions and 0 deletions

View File

@ -443,6 +443,7 @@ if test x$use_hardening != xno; then
# These are only available on Windows.
AX_CHECK_LINK_FLAG([[-Wl,--dynamicbase]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--dynamicbase"],[AC_MSG_ERROR(Cannot enable --dynamicbase)])
AX_CHECK_LINK_FLAG([[-Wl,--nxcompat]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--nxcompat"],[AC_MSG_ERROR(Cannot enable --nxcompat)])
AX_CHECK_LINK_FLAG([[-Wl,--high-entropy-va]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--high-entropy-va"],[AC_MSG_ERROR(Cannot enable ASLR)])
fi
case $host in