]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Use .section .rodata instead of .rodata on FreeBSD
authorDimitry Andric <dimitry@andric.com>
Sat, 25 Feb 2023 00:45:48 +0000 (01:45 +0100)
committerGitHub <noreply@github.com>
Sat, 25 Feb 2023 00:45:48 +0000 (16:45 -0800)
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 <mjguzik@gmail.com>
Reviewed-by: Attila Fülöp <attila@fueloep.org>
Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Signed-off-by: Dimitry Andric <dimitry@andric.com>
Closes #14526

include/os/freebsd/spl/sys/ia32/asm_linkage.h
lib/libspl/include/os/freebsd/sys/ia32/asm_linkage.h

index 1ebfd835066152799bd8867f971150dc69ac7fee..d1f53cf22f41437ef6bada3b8e2190b7458f498b 100644 (file)
@@ -36,7 +36,7 @@
 #define        ENDBR
 
 #define        SECTION_TEXT .text
-#define        SECTION_STATIC .rodata
+#define        SECTION_STATIC .section .rodata
 
 #ifdef __cplusplus
 extern "C" {
index 08c73037990f25e8955a961e6698408518cd20b7..1c4d7442364484c7cde233711fd8c61f216d2d0a 100644 (file)
@@ -40,7 +40,7 @@
 #define        ENDBR
 
 #define        SECTION_TEXT .text
-#define        SECTION_STATIC .rodata
+#define        SECTION_STATIC .section .rodata
 
 #ifdef __cplusplus
 extern "C" {