HomeFreeBSD

zfs: Use .section .rodata instead of .rodata on FreeBSD

Description

zfs: Use .section .rodata instead of .rodata on FreeBSD

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.

[mjg: cherry-picked from upstream zfs bf1bec394e715de9f7ac4a54b5b1b884d7e41a32
to unbreak gcc12 build]

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

Details

Provenance
dimAuthored on Feb 25 2023, 12:45 AM
mjgCommitted on Mar 13 2023, 1:48 PM
Parents
rG0a310c94eeb8: vm: consistently prefix fault helpers with vm_fault_
Branches
Unknown
Tags
Unknown