rts/linker: Use mmapForLinker to map PLT

The PLT needs to be located within a close distance of
the code calling it under the small memory model.

Fixes #16784.

(cherry picked from commit 0b7f81f5)
21 jobs for !1174 with wip/backport-MR1139 in 519 minutes and 43 seconds (queued for 2 seconds)
detached
Status Job ID Name Coverage
  Lint
passed #100690
lint
ghc-linters

00:00:16

passed #100691
lint
lint-submods-mr

00:00:15

 
  Build
failed #100694
x86_64-linux allowed to fail
release-x86_64-linux-deb9-dwarf

00:03:56

failed #100692
x86_64-linux allowed to fail
validate-x86_64-linux-deb8-hadrian

00:12:42

passed #100693
x86_64-linux
validate-x86_64-linux-deb9-debug

01:22:39

 
  Full Build
failed #100696
aarch64-linux allowed to fail
validate-aarch64-linux-deb9

01:02:56

passed #100697
x86_64-linux
validate-i386-linux-deb9

01:18:21

passed #100695
x86_64-darwin
validate-x86_64-darwin

00:57:45

passed #101510
x86_64-linux
validate-x86_64-linux-deb9

01:39:38

failed #100700
x86_64-linux allowed to fail
validate-x86_64-linux-deb9-integer-simple

00:38:27

failed #100699
x86_64-linux allowed to fail
validate-x86_64-linux-deb9-llvm

02:15:00

passed #100701
x86_64-linux
validate-x86_64-linux-deb9-unreg

02:21:55

passed #100702
x86_64-linux
validate-x86_64-linux-fedora27

01:31:57

failed #101511
x86_64-windows allowed to fail
validate-x86_64-windows

02:23:19

failed #101512
x86_64-windows allowed to fail
validate-x86_64-windows-hadrian

00:10:41

failed #100698
x86_64-linux
validate-x86_64-linux-deb9

00:14:36

failed #100704
x86_64-windows allowed to fail
validate-x86_64-windows

failed #100703
x86_64-windows allowed to fail
validate-x86_64-windows-hadrian

 
  Cleanup
passed #100706
x86_64-darwin
cleanup-darwin

00:00:06

passed #100705
x86_64-windows
cleanup-windows

00:00:23

 
  Hackage
manual #100707
x86_64-linux allowed to fail manual
hackage
 
Name Stage Failure
failed
validate-x86_64-linux-deb8-hadrian Build There has been a runner system failure, please try again
Running with gitlab-runner 11.9.2 (v11.9.2)
on serokell-jupiter-1 BcnYxdgF
Using Docker executor with image registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb8:cefaee3c742af193e0f7783f87edb0d35374515c ...
Pulling docker image registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb8:cefaee3c742af193e0f7783f87edb0d35374515c ...
Using docker image sha256:5a8a75ee73b262d2cd6b452e00dd7ac8e352813a396dec427a5e332d7ca5bb4a for registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb8:cefaee3c742af193e0f7783f87edb0d35374515c ...
ERROR: Job failed (system failure): Error response from daemon: No such container: 67df7b0df0117ab392928c3a096005325ac8870e10b36a3fe98c81de64b99a72 (executor_docker.go:932:4s)
failed
validate-x86_64-windows Full Build
junit.xml: found 1 matching files                  
WARNING: Failed to load system CertPool:crypto/x509: system root pool is not available on Windows
Uploading artifacts to coordinator... ok
id=101511 responseStatus=201 Created token=yWL9E_PW
Uploading artifacts...
Runtime platform
arch=amd64 os=windows pid=4512 revision=1f513601 version=11.10.1
junit.xml: found 1 matching files

WARNING: Failed to load system CertPool:crypto/x509: system root pool is not available on Windows
Uploading artifacts to coordinator... ok
id=101511 responseStatus=201 Created token=yWL9E_PW
ERROR: Job failed: exit status 2
failed
validate-aarch64-linux-deb9 Full Build
$ cp -Rf $HOME/.cabal cabal-cache
Uploading artifacts...
WARNING: ghc-*.tar.xz: no matching files
WARNING: junit.xml: no matching files
ERROR: No files to upload
Uploading artifacts...
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
validate-x86_64-linux-deb9-llvm Full Build
make[1]: *** [test] Error 1
make: *** [test] Error 2
Makefile:224: recipe for target 'test' failed
Running after script...
$ cp -Rf $HOME/.cabal cabal-cache
Uploading artifacts...
junit.xml: found 1 matching files
Uploading artifacts to coordinator... ok
id=100699 responseStatus=201 Created token=YDc7Yt_N
ERROR: Job failed: exit code 1
failed
release-x86_64-linux-deb9-dwarf Build
$ cp -Rf $HOME/.cabal cabal-cache
Uploading artifacts...
WARNING: ghc-*.tar.xz: no matching files
WARNING: junit.xml: no matching files
ERROR: No files to upload
Uploading artifacts...
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
validate-x86_64-linux-deb9-integer-simple Full Build
make[1]: *** Waiting for unfinished jobs....
Makefile:123: recipe for target 'all' failed
make: *** [all] Error 2
Running after script...
$ cp -Rf $HOME/.cabal cabal-cache
Uploading artifacts...
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
validate-x86_64-windows-hadrian Full Build
   Speed :           109365160 Bytes/sec.
Speed : 6257.924 MegaBytes/min.
Ended : Wednesday, June 12, 2019 11:21:42 PM

Uploading artifacts...
Runtime platform arch=amd64 os=windows pid=1376 revision=1f513601 version=11.10.1
WARNING: ghc.tar.xz: no matching files
ERROR: No files to upload
ERROR: Job failed: exit status 1