summaryrefslogtreecommitdiff
path: root/rts/LinkerInternals.h
diff options
context:
space:
mode:
authorZejun Wu <watashi@fb.com>2018-10-15 13:52:53 -0400
committerBen Gamari <ben@smart-cactus.org>2018-10-15 19:24:17 -0400
commit8306141397d6e47a169dbe4b7ff1b3319a502aa7 (patch)
tree4397939b9508e4d2e06ced33d6568dd837784dfc /rts/LinkerInternals.h
parent104599f3f157613589e78627c915e4dc20ee54b4 (diff)
downloadhaskell-8306141397d6e47a169dbe4b7ff1b3319a502aa7.tar.gz
Allocate bss section within proper range of other sections
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 This depends on {D5195} Test Plan: 1. `./validate` 2. with ``` DYNAMIC_GHC_PROGRAMS = NO DYNAMIC_BY_DEFAULT = NO ``` `TEST="T15729" make test` passed in both linux 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/D5219
Diffstat (limited to 'rts/LinkerInternals.h')
-rw-r--r--rts/LinkerInternals.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h
index 04d873ca99..9c34c18aef 100644
--- a/rts/LinkerInternals.h
+++ b/rts/LinkerInternals.h
@@ -193,6 +193,10 @@ typedef struct _ObjectCode {
unsigned long first_symbol_extra;
unsigned long n_symbol_extras;
#endif
+ /* Additional memory that is preallocated and contiguous with image
+ which can be used used to relocate bss sections. */
+ char* bssBegin;
+ char* bssEnd;
ForeignExportStablePtr *stable_ptrs;