Add a RTS option -xp to load PIC object anywhere in address space
ClosedPublic

Authored by watashi on Oct 31 2018, 8:46 PM.

Details

Summary

This re-applies D5195: Add a RTS option -xp to load PIC object anywhere in address space with fixes for i386:

{P190}

Add a RTS option -xp to load PIC object anywhere in address space. We do
this by relaxing the requirement of <0x80000000 result of
mmapForLinker and implying USE_CONTIGUOUS_MMAP.

We also need to change calls to ocInit and ocGetNames to avoid
dangling pointers when the address of oc->image is changed by
ocAllocateSymbolExtra.

Test Plan

See D5195: Add a RTS option -xp to load PIC object anywhere in address space, also test under i386:

$ uname -a
Linux watashi-arch32 4.18.5-arch1-1.0-ARCH #1 SMP PREEMPT Tue Aug 28
20:45:30 CEST 2018 i686 GNU/Linux
$ cd testsuite/tests/th/ && make test
...

will run ./validate on stacked diff.

watashi created this revision.Oct 31 2018, 8:46 PM
watashi updated this revision to Diff 18548.Oct 31 2018, 8:59 PM

amend with the actual fix

alpmestan updated this revision to Diff 18556.Nov 1 2018, 11:39 AM

(try pushing this patch to the staging repo)

ping

Can we still have this in ghc-8.8?

simonmar accepted this revision.Nov 19 2018, 2:30 AM

Let's do it.

This revision is now accepted and ready to land.Nov 19 2018, 2:30 AM
watashi closed this revision.Feb 1 2019, 3:16 PM

merged