• 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
..
Makefile.in Loading commit data...
main.c Loading commit data...
main.h Loading commit data...
preloader.c Loading commit data...
preloader_mac.c Loading commit data...
wine.de.UTF-8.man.in Loading commit data...
wine.desktop Loading commit data...
wine.fr.UTF-8.man.in Loading commit data...
wine.inf.in Loading commit data...
wine.man.in Loading commit data...
wine.pl.UTF-8.man.in Loading commit data...
wine_info.plist.in Loading commit data...