summaryrefslogtreecommitdiff
path: root/rts/LinkerInternals.h
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-11-23 15:15:09 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-12-01 19:58:18 -0500
commitc35d0e03514ce111ff8265426a7b911456984f50 (patch)
treecc6dcc192d544638be5a4fd7582f2876c5c56ddd /rts/LinkerInternals.h
parentd8872af08d205c3067371d56200e68cf2f0c1ffc (diff)
downloadhaskell-c35d0e03514ce111ff8265426a7b911456984f50.tar.gz
rts/m32: Introduce NEEDS_M32 macro
Instead of relying on RTS_LINKER_USE_MMAP
Diffstat (limited to 'rts/LinkerInternals.h')
-rw-r--r--rts/LinkerInternals.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h
index 84a67753bd..cf8017a12f 100644
--- a/rts/LinkerInternals.h
+++ b/rts/LinkerInternals.h
@@ -169,6 +169,14 @@ typedef struct _Segment {
#define NEED_SYMBOL_EXTRAS 1
#endif
+/*
+ * We use the m32 allocator for symbol extras on Windows and other mmap-using
+ * platforms.
+ */
+#if RTS_LINKER_USE_MMAP
+#define NEED_M32 1
+#endif
+
/* Jump Islands are sniplets of machine code required for relative
* address relocations on the PowerPC, x86_64 and ARM.
*/
@@ -300,7 +308,7 @@ struct _ObjectCode {
require extra information.*/
StrHashTable *extraInfos;
-#if RTS_LINKER_USE_MMAP == 1
+#if defined(NEED_M32)
/* The m32 allocators used for allocating small sections and symbol extras
* during loading. We have two: one for (writeable) data and one for
* (read-only/executable) code. */