diff options
author | Simon Marlow <marlowsd@gmail.com> | 2015-10-15 16:17:06 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2015-10-15 16:19:45 +0100 |
commit | 04e8366608fee4f5e3358acc855bc6f556c3f508 (patch) | |
tree | 3b198e2dd38cc4587c679f6ada00031318406be6 /testsuite/tests/rts/linker_error.c | |
parent | 20e30d5f3d932d6393369ed56e4a1518f0ffe60b (diff) | |
download | haskell-04e8366608fee4f5e3358acc855bc6f556c3f508.tar.gz |
ELF/x86_64: map object file sections separately into the low 2GB
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
Diffstat (limited to 'testsuite/tests/rts/linker_error.c')
-rw-r--r-- | testsuite/tests/rts/linker_error.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/testsuite/tests/rts/linker_error.c b/testsuite/tests/rts/linker_error.c index 715eabd184..264c95d710 100644 --- a/testsuite/tests/rts/linker_error.c +++ b/testsuite/tests/rts/linker_error.c @@ -51,12 +51,12 @@ int main (int argc, char *argv[]) for (i=0; i < ITERATIONS; i++) { r = loadObj(obj); if (!r) { - debugBelch("loadObj(%s) failed", obj); + debugBelch("loadObj(%s) failed\n", obj); continue; } r = resolveObjs(); if (!r) { - debugBelch("resolveObjs failed"); + debugBelch("resolveObjs failed\n"); unloadObj(obj); continue; } |