• Brendan Shanks's avatar
    loader: On Mac, reserve an area starting at 4GB to force Rosetta's allocations higher. · 307f5d00
    Brendan Shanks authored
    On Apple Silicon, Rosetta allocates memory starting at 0x100000000
    (the 4GB line) before the preloader runs.
    The .NET 3.5 installer and DirectX Jun2010 redistributable both contain
    non-relocatable EXEs with that base address, which fail to run.
    
    The workaround is to create an empty linker section at that address,
    which is mapped by the kernel before Rosetta runs and forces Rosetta's
    allocations higher in memory.
    The linker section runs from 0x100000000-0x114000000.
    Rosetta's allocations are ~132MB, and should end below 0x120000000.
    
    This is not an exact science: a non-relocatable EXE with base address
    between 0x114000000-0x120000000 will fail to run. If one is discovered,
    the section size will need to be changed.
    Signed-off-by: 's avatarBrendan Shanks <bshanks@codeweavers.com>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    307f5d00
Name
Last commit
Last update
dlls Loading commit data...
documentation Loading commit data...
fonts Loading commit data...
include Loading commit data...
libs Loading commit data...
loader Loading commit data...
nls Loading commit data...
po Loading commit data...
programs Loading commit data...
server Loading commit data...
tools Loading commit data...
.editorconfig Loading commit data...
.mailmap Loading commit data...
ANNOUNCE Loading commit data...
AUTHORS Loading commit data...
COPYING.LIB Loading commit data...
LICENSE Loading commit data...
LICENSE.OLD Loading commit data...
MAINTAINERS Loading commit data...
Makefile.in Loading commit data...
README Loading commit data...
VERSION Loading commit data...
aclocal.m4 Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...