summaryrefslogtreecommitdiff
path: root/rts/LinkerInternals.h
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2016-11-02 15:00:44 -0400
committerBen Gamari <ben@smart-cactus.org>2016-11-02 15:42:00 -0400
commitabfa3196a19cd8912fdbae121641474b3261d7cf (patch)
tree842245ba13025947f06fdb5665d0a2894d2c38de /rts/LinkerInternals.h
parentf4fb3bc15f49997962e223c4f8c489566d7f5d91 (diff)
downloadhaskell-abfa3196a19cd8912fdbae121641474b3261d7cf.tar.gz
linker: Shuffle configuration into LinkerInternals.h
Test Plan: Validate Reviewers: erikd, austin, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2644
Diffstat (limited to 'rts/LinkerInternals.h')
-rw-r--r--rts/LinkerInternals.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h
index 729cf1d792..460beae1c9 100644
--- a/rts/LinkerInternals.h
+++ b/rts/LinkerInternals.h
@@ -301,4 +301,28 @@ getting, here. */
#endif /* OBJFORMAT_PEi386 */
+
+/*************************************************
+ * Various bits of configuration
+ *************************************************/
+
+/* PowerPC and ARM have relative branch instructions with only 24 bit
+ * displacements and therefore need jump islands contiguous with each object
+ * code module.
+ */
+#if defined(powerpc_HOST_ARCH)
+#define SHORT_REL_BRANCH 1
+#endif
+#if defined(arm_HOST_ARCH)
+#define SHORT_REL_BRANCH 1
+#endif
+
+#if (RTS_LINKER_USE_MMAP && defined(SHORT_REL_BRANCH) && defined(linux_HOST_OS))
+#define USE_CONTIGUOUS_MMAP 1
+#else
+#define USE_CONTIGUOUS_MMAP 0
+#endif
+
+
+
#endif /* LINKERINTERNALS_H */