Skip to content

Commit 2f394c0

Browse files
andreas-schwabpalmer-dabbelt
authored andcommitted
riscv: disable generation of unwind tables
GCC 13 will enable -fasynchronous-unwind-tables by default on riscv. In the kernel, we don't have any use for unwind tables yet, so disable them. More importantly, the .eh_frame section brings relocations (R_RISC_32_PCREL, R_RISCV_SET{6,8,16}, R_RISCV_SUB{6,8,16}) into modules that we are not prepared to handle. Signed-off-by: Andreas Schwab <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: [email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 87f48c7 commit 2f394c0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/riscv/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ ifeq ($(CONFIG_PERF_EVENTS),y)
8080
KBUILD_CFLAGS += -fno-omit-frame-pointer
8181
endif
8282

83+
# Avoid generating .eh_frame sections.
84+
KBUILD_CFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables
85+
8386
KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-relax)
8487
KBUILD_AFLAGS_MODULE += $(call as-option,-Wa$(comma)-mno-relax)
8588

0 commit comments

Comments
 (0)