From bf1bec394e715de9f7ac4a54b5b1b884d7e41a32 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 25 Feb 2023 01:45:48 +0100 Subject: [PATCH] Use .section .rodata instead of .rodata on FreeBSD MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In commit 0a5b942d4 the FreeBSD SECTION_STATIC macro was set to ".rodata". This assembler directive is supported by LLVM (as a convenience alias for ".section .rodata") by not by GNU as. This caused the FreeBSD builds that are done with gcc to fail. Therefore, use ".section .rodata" instead, similar to the other asm_linkage.h headers. Reviewed-by: Mateusz Guzik Reviewed-by: Attila Fülöp Reviewed-by: Jorgen Lundman Signed-off-by: Dimitry Andric Closes #14526 --- include/os/freebsd/spl/sys/ia32/asm_linkage.h | 2 +- lib/libspl/include/os/freebsd/sys/ia32/asm_linkage.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/os/freebsd/spl/sys/ia32/asm_linkage.h b/include/os/freebsd/spl/sys/ia32/asm_linkage.h index 1ebfd8350..d1f53cf22 100644 --- a/include/os/freebsd/spl/sys/ia32/asm_linkage.h +++ b/include/os/freebsd/spl/sys/ia32/asm_linkage.h @@ -36,7 +36,7 @@ #define ENDBR #define SECTION_TEXT .text -#define SECTION_STATIC .rodata +#define SECTION_STATIC .section .rodata #ifdef __cplusplus extern "C" { diff --git a/lib/libspl/include/os/freebsd/sys/ia32/asm_linkage.h b/lib/libspl/include/os/freebsd/sys/ia32/asm_linkage.h index 08c730379..1c4d74423 100644 --- a/lib/libspl/include/os/freebsd/sys/ia32/asm_linkage.h +++ b/lib/libspl/include/os/freebsd/sys/ia32/asm_linkage.h @@ -40,7 +40,7 @@ #define ENDBR #define SECTION_TEXT .text -#define SECTION_STATIC .rodata +#define SECTION_STATIC .section .rodata #ifdef __cplusplus extern "C" { -- 2.39.2