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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 7e92586 commit e597319

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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)