summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-03-04 10:47:12 -0500
committerMatthew Pickering <matthewtpickering@gmail.com>2022-03-11 11:04:18 +0000
commit235869e5cc340627570f3be068b1c327d0121d2d (patch)
treeb91ccb6491c9443d7952cb6b558c27b8962c1f11
parent844cf1e14fe031c9ed7597b00a1183ad9b1ccc0a (diff)
downloadhaskell-wip/adjustor-pool.tar.gz
rts/adjustor: Place adjustor templates in data section on all OSswip/adjustor-pool
In !7604 we started placing adjustor templates in the data section on Linux as some toolchains there reject relocations in the text section. However, it turns out that OpenBSD also exhibits this restriction. Fix this by *always* placing adjustor templates in the data section. Fixes #21155.
-rw-r--r--rts/adjustor/NativeAmd64Asm.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/adjustor/NativeAmd64Asm.S b/rts/adjustor/NativeAmd64Asm.S
index a4b0c9b484..aca52ebd46 100644
--- a/rts/adjustor/NativeAmd64Asm.S
+++ b/rts/adjustor/NativeAmd64Asm.S
@@ -27,7 +27,7 @@
*/
#if defined(darwin_HOST_OS)
.section __DATA,__data
-#elif defined(linux_HOST_OS)
+#else
.section .data
#endif
@@ -89,7 +89,7 @@ DECLARE_CSYM(complex_ccall_adjustor_end)
/* See Note [Adjustor templates live in data section]. */
#if defined(darwin_HOST_OS)
.section __TEXT,__text
-#elif defined(linux_HOST_OS)
+#else
.section .text
#endif