Skip to content

Commit e597319

Browse files
xhackerustcpalmer-dabbelt
authored andcommitted
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>
1 parent 7e92586 commit e597319

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

arch/riscv/kernel/vmlinux.lds.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ SECTIONS
9797
*(.rel.dyn*)
9898
}
9999

100+
.rela.dyn : {
101+
*(.rela*)
102+
}
103+
100104
__init_data_end = .;
101105

102106
. = ALIGN(8);

0 commit comments

Comments
 (0)