Commit a58c22d6 authored by Alex Smith's avatar Alex Smith Committed by Hendrik Leppkes

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: 's avatarAlex Smith <alex.smith@warpsharp.info>
parent 238ca2d7
...@@ -4400,6 +4400,10 @@ case $target_os in ...@@ -4400,6 +4400,10 @@ case $target_os in
add_ldexeflags -Wl,--pic-executable,-e,_mainCRTStartup add_ldexeflags -Wl,--pic-executable,-e,_mainCRTStartup
elif enabled x86_64; then elif enabled x86_64; then
add_ldexeflags -Wl,--pic-executable,-e,mainCRTStartup 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 fi
;; ;;
win32|win64) win32|win64)
......
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