--- /dev/null
+From 6dcbd0a69c84a8ae7a442840a8cf6b1379dc8f16 Mon Sep 17 00:00:00 2001
+From: Jiaxun Yang <jiaxun.yang@flygoat.com>
+Date: Sat, 8 Apr 2023 21:33:48 +0100
+Subject: MIPS: Define RUNTIME_DISCARD_EXIT in LD script
+
+From: Jiaxun Yang <jiaxun.yang@flygoat.com>
+
+commit 6dcbd0a69c84a8ae7a442840a8cf6b1379dc8f16 upstream.
+
+MIPS's exit sections are discarded at runtime as well.
+
+Fixes link error:
+`.exit.text' referenced in section `__jump_table' of fs/fuse/inode.o:
+defined in discarded section `.exit.text' of fs/fuse/inode.o
+
+Fixes: 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv")
+Reported-by: "kernelci.org bot" <bot@kernelci.org>
+Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/mips/kernel/vmlinux.lds.S | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/arch/mips/kernel/vmlinux.lds.S
++++ b/arch/mips/kernel/vmlinux.lds.S
+@@ -10,6 +10,8 @@
+ */
+ #define BSS_FIRST_SECTIONS *(.bss..swapper_pg_dir)
+
++#define RUNTIME_DISCARD_EXIT
++
+ #include <asm-generic/vmlinux.lds.h>
+
+ #undef mips
nilfs2-initialize-unused-bytes-in-segment-summary-blocks.patch
memstick-fix-memory-leak-if-card-device-is-never-registered.patch
mmc-sdhci_am654-set-high_speed_ena-for-sdr12-and-sdr25.patch
+mips-define-runtime_discard_exit-in-ld-script.patch