summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Steuck <greg@nest.cx>2021-12-11 19:28:16 -0800
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-12-12 12:52:56 -0500
commit401ddd5300c8be2ee03bf040146e7f2878bae0a9 (patch)
tree9e537298f9a989dcd5c8a8682f493ec4bf795020
parent31bf380f3925d72a3369978d28d02aaae31f75ef (diff)
downloadhaskell-401ddd5300c8be2ee03bf040146e7f2878bae0a9.tar.gz
Respect W^X in Linker.c:preloadObjectFile on OpenBSD
This fixes -fexternal-interpreter for ghci. Fixes #20814.
-rw-r--r--rts/Linker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/Linker.c b/rts/Linker.c
index 98c8fe4003..ebb80a955c 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -1580,7 +1580,7 @@ preloadObjectFile (pathchar *path)
*
* See also the misalignment logic for darwin below.
*/
-#if defined(darwin_HOST_OS)
+#if defined(darwin_HOST_OS) || defined(openbsd_HOST_OS)
image = mmapForLinker(fileSize, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
#else
image = mmapForLinker(fileSize, PROT_READ|PROT_WRITE|PROT_EXEC,