summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/linking/Makefile
diff options
context:
space:
mode:
authorZejun Wu <watashi@fb.com>2018-12-28 20:47:33 -0800
committerBen Gamari <ben@smart-cactus.org>2019-01-30 10:06:32 -0500
commit740534d43cf9f1635c60f6311b7e0d89af962617 (patch)
treeeb9c9d3b9fecf99177e160d6ac7c94dff74417f0 /testsuite/tests/ghci/linking/Makefile
parente29b1ee72d77d5a06ac949f9dcc80108243a25c0 (diff)
downloadhaskell-740534d43cf9f1635c60f6311b7e0d89af962617.tar.gz
Allocate bss section within proper range of other sections
Summary: This re-applies {D5195} and {D5235}, they were reverted as part of diff stack to unbreak i386. The proper fix is done in {D5289}. Allocate bss section within proper range of other sections: * when `+RTS -xp` is passed, allocate it contiguously as we did for jump islands * when we mmap the code to lower 2Gb, we should allocate bss section there too Test Plan: 1. `./validate` 2. with ``` DYNAMIC_GHC_PROGRAMS = NO DYNAMIC_BY_DEFAULT = NO ``` `TEST="T15729" make test` passed in both linux (both i386 and x86_64) and macos. 3. Also test in a use case where we used to encouter error like: ``` ghc-iserv-prof: R_X86_64_PC32 relocation out of range: (noname) = b90282ba ``` and now, everything works fine. Reviewers: simonmar, bgamari, angerman, erikd Reviewed By: simonmar Subscribers: rwbarton, carter GHC Trac Issues: #15729 Differential Revision: https://phabricator.haskell.org/D5290
Diffstat (limited to 'testsuite/tests/ghci/linking/Makefile')
-rw-r--r--testsuite/tests/ghci/linking/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/linking/Makefile b/testsuite/tests/ghci/linking/Makefile
index 793998eb92..bfbcf24350 100644
--- a/testsuite/tests/ghci/linking/Makefile
+++ b/testsuite/tests/ghci/linking/Makefile
@@ -134,3 +134,8 @@ T14708:
"$(TEST_HC)" -c add.c -o T14708scratch/add.o
"$(AR)" cqs T14708scratch/libadd.a T14708scratch/add.o
-"$(TEST_HC)" $(TEST_HC_OPTS_INTERACTIVE) -LT14708scratch -ladd T14708.hs
+
+.PHONY: T15729
+T15729:
+ "$(TEST_HC)" -fPIC -c T15729.c -o bss.o
+ echo "main" | "$(TEST_HC)" $(TEST_HC_OPTS_INTERACTIVE) bss.o T15729.hs