diff options
author | Sam Lantinga <slouken@libsdl.org> | 2018-11-02 18:07:11 -0700 |
---|---|---|
committer | Sam Lantinga <slouken@libsdl.org> | 2018-11-02 18:07:11 -0700 |
commit | f5eeebbe656b6cfa69bd44f68bbff6a820c08ae0 (patch) | |
tree | d7aeeda2596b2ae664e75579f7a8a27686f54ae6 /configure | |
parent | 83b7dd946d947555ef4c8c78a23e4c2c76c9df2c (diff) |
Fixed bug 4308 - Prebuilt SDL.dll files not compiled with ASLR support (DYNAMICBASE)
Cameron Gutman
The current SDL 2.0.8 and the prerelease SDL 2.0.9 are compiled without the DYNAMICBASE flag to indicate that ASLR may relocate the DLL at load-time. https://docs.microsoft.com/en-us/cpp/build/reference/dynamicbase-use-address-space-layout-randomization?view=vs-2017
When I build SDL.dll myself using the VS2010 project, the DLL has the DYNAMICBASE flag set (as is the default). Similarly, MinGW-w64 also enables ASLR by default on all binaries for a couple years now (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836365)
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 102 |
1 files changed, 102 insertions, 0 deletions
@@ -16063,6 +16063,108 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_no_undefined" >&5 $as_echo "$have_no_undefined" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker option --dynamicbase" >&5 +$as_echo_n "checking for linker option --dynamicbase... " >&6; } +have_dynamicbase=no +case "$host" in + *) + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,--dynamicbase" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + have_dynamicbase=yes + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--dynamicbase" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dynamicbase" >&5 +$as_echo "$have_dynamicbase" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker option --nxcompat" >&5 +$as_echo_n "checking for linker option --nxcompat... " >&6; } +have_nxcompat=no +case "$host" in + *) + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,--nxcompat" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + have_nxcompat=yes + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--nxcompat" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_nxcompat" >&5 +$as_echo "$have_nxcompat" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker option --high-entropy-va" >&5 +$as_echo_n "checking for linker option --high-entropy-va... " >&6; } +have_high_entropy_va=no +case "$host" in + *) + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,--high-entropy-va" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + have_high_entropy_va=yes + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--high-entropy-va" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_high_entropy_va" >&5 +$as_echo "$have_high_entropy_va" >&6; } + # Check whether --enable-libc was given. if test "${enable_libc+set}" = set; then : enableval=$enable_libc; |