From 235869e5cc340627570f3be068b1c327d0121d2d Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Fri, 4 Mar 2022 10:47:12 -0500 Subject: 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. --- rts/adjustor/NativeAmd64Asm.S | 4 ++-- 1 file 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 -- cgit v1.2.1