configure: Load wine lower in memory on FreeBSD to leave more space for mmap() and malloc().
If not provided an explicit address, FreeBSD won't mmap any memory below the executable. In particularly this means any memory below that is unavailable to dlopen() and malloc(). This fixes the bug where large WineLib binaries, in particular winetest, failed to load because there was not enough space left for them and the native libraries they linked to. The drawback is that we can no longer load very large Windows executables (between about 1.5 and 2 GB).
This commit is contained in:
parent
e609bb0453
commit
5f694ddf4c
|
@ -6897,7 +6897,11 @@ eval ac_res=\$$as_ac_var
|
|||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||
$as_echo "$ac_res" >&6; }
|
||||
if test `eval 'as_val=${'$as_ac_var'};$as_echo "$as_val"'` = yes; then :
|
||||
LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x7bf00400"
|
||||
case $host_os in
|
||||
freebsd*) LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x60000400" ;;
|
||||
*) LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x7bf00400" ;;
|
||||
esac
|
||||
|
||||
fi
|
||||
# Extract the first word of "prelink", so it can be a program name with args.
|
||||
set dummy prelink; ac_word=$2
|
||||
|
|
|
@ -792,7 +792,11 @@ case $host_os in
|
|||
case $host_cpu in
|
||||
*i[[3456789]]86* | x86_64)
|
||||
WINE_TRY_CFLAGS([-Wl,--section-start,.interp=0x7bf00400],
|
||||
[LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x7bf00400"])
|
||||
[case $host_os in
|
||||
freebsd*) LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x60000400" ;;
|
||||
*) LDEXECFLAGS="$LDEXECFLAGS -Wl,--section-start,.interp=0x7bf00400" ;;
|
||||
esac
|
||||
])
|
||||
AC_PATH_PROG(PRELINK, prelink, false, [/sbin /usr/sbin $PATH])
|
||||
if test "x$PRELINK" = xfalse
|
||||
then
|
||||
|
|
Loading…
Reference in New Issue