Commit aaae6606 authored by Emmanuel Maillard's avatar Emmanuel Maillard Committed by Alexandre Julliard

loader: Reserve memory area on Darwin (based on Steve Zellers patch).

parent 087af502
......@@ -311,7 +311,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS DLLDEFS build build_cpu build_vendor build_os host host_cpu host_vendor host_os WIN16_FILES WIN16_INSTALL SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPPBIN ac_ct_CPPBIN TOOLSDIR CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LEX LEXLIB LEX_OUTPUT_ROOT XLEX BISON AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP WINDRES ac_ct_WINDRES LN_S LN EGREP LDCONFIG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LINT LINTFLAGS FONTFORGE PKG_CONFIG PRELINK LIBPTHREAD XLIB XFILES OPENGLFILES GLU32FILES OPENGL_LIBS GLUT_LIBS GLUT32FILES NASLIBS XML2LIBS XML2INCL XSLTLIBS XSLTINCL CURSESLIBS sane_devel SANELIBS SANEINCL ICULIBS LCMSLIBS LDAPLIBS FREETYPELIBS FREETYPEINCL ft_devel ft_devel2 FONTSSUBDIRS ARTSCCONFIG ARTSLIBS ARTSINCL ESDCONFIG ESDLIBS ESDINCL ALSALIBS AUDIOIOLIBS EXTRACFLAGS BUILTINFLAG DLLEXT DLLFLAGS DLLIBS LDSHARED LDDLLFLAGS LIBEXT IMPLIBEXT DLLTOOL ac_ct_DLLTOOL DLLWRAP ac_ct_DLLWRAP LDEXECFLAGS COREFOUNDATIONLIB IOKITLIB LDLIBWINEFLAGS CROSSTEST CROSSCC CROSSWINDRES LDPATH CRTLIBS SOCKETLIBS WINE_BINARIES MAIN_BINARY LDD LIBOBJS LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS DLLDEFS build build_cpu build_vendor build_os host host_cpu host_vendor host_os WIN16_FILES WIN16_INSTALL SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPPBIN ac_ct_CPPBIN TOOLSDIR CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LEX LEXLIB LEX_OUTPUT_ROOT XLEX BISON AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP WINDRES ac_ct_WINDRES LN_S LN EGREP LDCONFIG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LINT LINTFLAGS FONTFORGE PKG_CONFIG PRELINK LIBPTHREAD XLIB XFILES OPENGLFILES GLU32FILES OPENGL_LIBS GLUT_LIBS GLUT32FILES NASLIBS XML2LIBS XML2INCL XSLTLIBS XSLTINCL CURSESLIBS sane_devel SANELIBS SANEINCL ICULIBS LCMSLIBS LDAPLIBS FREETYPELIBS FREETYPEINCL ft_devel ft_devel2 FONTSSUBDIRS ARTSCCONFIG ARTSLIBS ARTSINCL ESDCONFIG ESDLIBS ESDINCL ALSALIBS AUDIOIOLIBS EXTRACFLAGS BUILTINFLAG DLLEXT DLLFLAGS DLLIBS LDSHARED LDDLLFLAGS LIBEXT IMPLIBEXT DLLTOOL ac_ct_DLLTOOL DLLWRAP ac_ct_DLLWRAP LDEXECFLAGS COREFOUNDATIONLIB IOKITLIB CROSSTEST CROSSCC CROSSWINDRES LDPATH CRTLIBS SOCKETLIBS WINE_BINARIES MAIN_BINARY LDD LIBOBJS LTLIBOBJS'
ac_subst_files='MAKE_RULES MAKE_DLL_RULES MAKE_IMPLIB_RULES MAKE_TEST_RULES MAKE_LIB_RULES MAKE_PROG_RULES'
# Initialize some variables set by options.
......@@ -12882,18 +12882,12 @@ echo "${ECHO_T}$ac_cv_c_dll_macho" >&6
IOKITLIB="-framework IOKit -framework CoreFoundation"
case $host_cpu in
*i[3456789]86*)
LDEXECFLAGS="-image_base 0x7bf00000"
LDEXECFLAGS="-image_base 0x7bf00000 -Wl,-segaddr,WINE_DOS,0x00000000,-segaddr,WINE_SHARED_HEAP,0x7ffe0000"
;;
case $host_cpu in
*powerpc*)
CFLAGS="$CFLAGS -ffixed-r13"
LDDLLFLAGS="$LDDLLFLAGS -read_only_relocs warning"
LDEXECFLAGS="-seg1addr 0x120000"
LDLIBWINEFLAGS="-seg1addr 0x140000"
;;
esac
......@@ -19863,7 +19857,6 @@ s,@ac_ct_DLLWRAP@,$ac_ct_DLLWRAP,;t t
s,@LDEXECFLAGS@,$LDEXECFLAGS,;t t
s,@COREFOUNDATIONLIB@,$COREFOUNDATIONLIB,;t t
s,@IOKITLIB@,$IOKITLIB,;t t
s,@LDLIBWINEFLAGS@,$LDLIBWINEFLAGS,;t t
s,@CROSSTEST@,$CROSSTEST,;t t
s,@CROSSCC@,$CROSSCC,;t t
s,@CROSSWINDRES@,$CROSSWINDRES,;t t
......
......@@ -1020,16 +1020,11 @@ case $host_os in
dnl declare needed frameworks
AC_SUBST(COREFOUNDATIONLIB,"-framework CoreFoundation")
AC_SUBST(IOKITLIB,"-framework IOKit -framework CoreFoundation")
AC_SUBST(LDEXECFLAGS,["-image_base 0x7bf00000 -Wl,-segaddr,WINE_DOS,0x00000000,-segaddr,WINE_SHARED_HEAP,0x7ffe0000"])
case $host_cpu in
*i[[3456789]]86*)
AC_SUBST(LDEXECFLAGS,"-image_base 0x7bf00000")
;;
*powerpc*)
CFLAGS="$CFLAGS -ffixed-r13"
LDDLLFLAGS="$LDDLLFLAGS -read_only_relocs warning"
dnl Relocate wine executable (FIXME: is this really needed?)
AC_SUBST(LDEXECFLAGS,"-seg1addr 0x120000")
AC_SUBST(LDLIBWINEFLAGS,"-seg1addr 0x140000")
;;
esac
......
......@@ -6,7 +6,7 @@ LIBRARY = wine
SOVERSION = 1
VERSCRIPT = $(SRCDIR)/wine.map
EXTRADEFS = -D__WINESRC__ -DBINDIR="\"$(bindir)\"" -DLIBDIR="\"$(libdir)\"" -DDLLDIR="\"$(dlldir)\""
EXTRALIBS = $(LIBPORT) @DLLIBS@ @CRTLIBS@ @LDLIBWINEFLAGS@
EXTRALIBS = $(LIBPORT) @DLLIBS@ @CRTLIBS@
C_SRCS = \
config.c \
......
......@@ -23,8 +23,21 @@
#include "wine/library.h"
#include "main.h"
#ifdef __APPLE__
asm(".zerofill WINE_DOS, WINE_DOS, ___wine_dos, 0x20000000");
asm(".zerofill WINE_SHARED_HEAP, WINE_SHARED_HEAP, ___wine_shared_heap, 0x01020000");
extern char __wine_dos[0x20000000], __wine_shared_heap[0x01020000];
static const struct wine_preload_info wine_main_preload_info[] =
{
{ __wine_dos, sizeof(__wine_dos) }, /* DOS area + PE exe */
{ __wine_shared_heap, sizeof(__wine_shared_heap) }, /* shared user data + shared heap */
{ 0, 0 } /* end of list */
};
#else
/* the preloader will set this variable */
const struct wine_preload_info *wine_main_preload_info = NULL;
#endif
/**********************************************************************
* main
......
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