summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-03-04 10:47:12 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-03-23 13:42:07 -0400
commitfed05347224ee2fc36e926eb18532327896e287a (patch)
treecfab9563a8b88911f1504ddef35f0642f8bc8fb8
parent4dc624987a7e000e9e1086a601039afafb7f2d28 (diff)
downloadhaskell-fed05347224ee2fc36e926eb18532327896e287a.tar.gz
rts/adjustor: Place adjustor templates in data section on all OSs
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