From: Jisheng Zhang Date: Thu, 19 Jan 2023 15:54:14 +0000 (+0800) Subject: riscv: vmlinux.lds.S: explicitly catch .rela.dyn symbols X-Git-Tag: v6.3-rc1~86^2~5^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e5973191a8e33ffadef4882a261130866a1e70dc;p=thirdparty%2Flinux.git riscv: vmlinux.lds.S: explicitly catch .rela.dyn symbols When enabling linker orphan section warning, I got warnings similar as below: riscv64-linux-gnu-ld: warning: orphan section `.rela.text' from `init/main.o' being placed in section `.rela.dyn' Use the approach similar as ARM64 does and declare it in vmlinux.lds.S Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20230119155417.2600-3-jszhang@kernel.org Signed-off-by: Palmer Dabbelt --- diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S index 07c19f2a288cd..6a250313b7528 100644 --- a/arch/riscv/kernel/vmlinux.lds.S +++ b/arch/riscv/kernel/vmlinux.lds.S @@ -97,6 +97,10 @@ SECTIONS *(.rel.dyn*) } + .rela.dyn : { + *(.rela*) + } + __init_data_end = .; . = ALIGN(8);