summaryrefslogtreecommitdiff
path: root/arch/riscv
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@kernel.org>2023-01-19 18:54:14 +0300
committerPalmer Dabbelt <palmer@rivosinc.com>2023-02-22 03:29:04 +0300
commite5973191a8e33ffadef4882a261130866a1e70dc (patch)
treefa0b0ce6bdc3552769a7cac24134dcf6d932f4e1 /arch/riscv
parent7e92586c28a50dd5875655c0d169184a5acb0eee (diff)
downloadlinux-e5973191a8e33ffadef4882a261130866a1e70dc.tar.xz
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 <jszhang@kernel.org> Link: https://lore.kernel.org/r/20230119155417.2600-3-jszhang@kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv')
-rw-r--r--arch/riscv/kernel/vmlinux.lds.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S
index 07c19f2a288c..6a250313b752 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);