summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorAlex Smith <alex.smith@warpsharp.info>2015-09-26 02:43:23 -0400
committerHendrik Leppkes <h.leppkes@gmail.com>2015-09-28 10:15:49 +0200
commita58c22d61260941fc651add73836882d5b112fdb (patch)
tree5bb4d36b7b973d2ece112027d4e8ccafc55a16f7 /configure
parent238ca2d723605bd5756181087551cf7dcd46076b (diff)
downloadffmpeg-streaming-a58c22d61260941fc651add73836882d5b112fdb.zip
ffmpeg-streaming-a58c22d61260941fc651add73836882d5b112fdb.tar.gz
configure: Support for HEASLR on mingw targets
The appropriate flag for HEASLR (--high-entropy-va) was added in binutils 2.25. Also set the image base >4GB so higher entropy gets applied to image base randomization when used with HEASLR (8 -> 17 bits of randomization). Windows does this for compatibility because of "latent pointer truncation issues". Signed-off-by: Alex Smith <alex.smith@warpsharp.info>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure b/configure
index bd4f91d..b572d59 100755
--- a/configure
+++ b/configure
@@ -4400,6 +4400,10 @@ case $target_os in
add_ldexeflags -Wl,--pic-executable,-e,_mainCRTStartup
elif enabled x86_64; then
add_ldexeflags -Wl,--pic-executable,-e,mainCRTStartup
+ check_ldflags -Wl,--high-entropy-va # binutils 2.25
+ # Set image base >4GB for extra entropy with HEASLR
+ add_ldexeflags -Wl,--image-base,0x140000000
+ append SHFLAGS -Wl,--image-base,0x180000000
fi
;;
win32|win64)
OpenPOWER on IntegriCloud