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.

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
This commit is contained in:
Dimitry Andric 2023-02-25 01:45:48 +01:00 committed by GitHub
parent d816bc5ec7
commit bf1bec394e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@
#define ENDBR
#define SECTION_TEXT .text
#define SECTION_STATIC .rodata
#define SECTION_STATIC .section .rodata
#ifdef __cplusplus
extern "C" {

View File

@ -40,7 +40,7 @@
#define ENDBR
#define SECTION_TEXT .text
#define SECTION_STATIC .rodata
#define SECTION_STATIC .section .rodata
#ifdef __cplusplus
extern "C" {