• Simon Marlow's avatar
    ELF/x86_64: map object file sections separately into the low 2GB · 04e83666
    Simon Marlow authored
    On 64-bit ELF we need to link object files into the low 2GB due to the
    small memory model.  Previously we would map the entire object file
    using MAP_32BIT, but the object file can consist of 75% or more
    symbols, which only need to be present during linking, so this is
    wasteful.  In our particular application, we're already running out of
    space here.
    
    This patch changes the way we load object files on ELF platforms so
    that the object is first mapped above the 2GB boundary, parsed, and
    then the important sections are re-mapped into the low 2GB area.
    
    Test Plan:
    validate
    (also needs testing on OS X & Windows, preferably 32 & 64 bit)
    
    Reviewers: Phyx, trommler, bgamari, austin
    
    Subscribers: hsyl20, thomie, bgamari
    
    Differential Revision: https://phabricator.haskell.org/D975
    04e83666
Name
Last commit
Last update
bindisttest Loading commit data...
compiler Loading commit data...
distrib Loading commit data...
docs Loading commit data...
driver Loading commit data...
ghc Loading commit data...
includes Loading commit data...
libffi Loading commit data...
libffi-tarballs @ b6658e5d Loading commit data...
libraries Loading commit data...
mk Loading commit data...
nofib @ a5995850 Loading commit data...
rts Loading commit data...
rules Loading commit data...
testsuite Loading commit data...
utils Loading commit data...
.arcconfig Loading commit data...
.arclint Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
ANNOUNCE Loading commit data...
HACKING.md Loading commit data...
INSTALL.md Loading commit data...
LICENSE Loading commit data...
MAKEHELP.md Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
Vagrantfile Loading commit data...
aclocal.m4 Loading commit data...
boot Loading commit data...
config.guess Loading commit data...
config.sub Loading commit data...
configure.ac Loading commit data...
ghc.mk Loading commit data...
install-sh Loading commit data...
packages Loading commit data...
settings.in Loading commit data...
validate Loading commit data...