aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv/Makefile
diff options
context:
space:
mode:
authorAndreas Schwab2023-02-01 10:29:45 +0100
committerGreg Kroah-Hartman2023-02-09 11:28:20 +0100
commit4afacf17ff0f6a76b2ba5f5f3908ab18cf6de5e5 (patch)
tree211cf77a15d83e66edd83290b31017b00d68b4b4 /arch/riscv/Makefile
parent3028c3a169a2bbed54a3d73caebb0c3931ec6356 (diff)
riscv: disable generation of unwind tables
commit 2f394c0e7d1129a35156e492bc8f445fb20f43ac upstream. 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 <schwab@suse.de> Link: https://lore.kernel.org/r/mvmzg9xybqu.fsf@suse.de Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/riscv/Makefile')
-rw-r--r--arch/riscv/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index 0d13b597cb55..c8187867c5f4 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -80,6 +80,9 @@ ifeq ($(CONFIG_PERF_EVENTS),y)
KBUILD_CFLAGS += -fno-omit-frame-pointer
endif
+# Avoid generating .eh_frame sections.
+KBUILD_CFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables
+
KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-relax)
KBUILD_AFLAGS_MODULE += $(call as-option,-Wa$(comma)-mno-relax)