Skip to content

Commit 0ed0031

Browse files
xhackerustcpalmer-dabbelt
authored andcommitted
riscv: vmlinux.lds.S: explicitly catch .init.bss sections from EFI stub
When enabling linker orphan section warning, I got warnings similar as below: ld.lld: warning: ./drivers/firmware/efi/libstub/lib.a(efi-stub-helper.stub.o):(.init.bss) is being placed in '.init.bss' Catch the sections so that we can enable linker orphan section warning. Signed-off-by: Jisheng Zhang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent b13e64d commit 0ed0031

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/riscv/kernel/vmlinux.lds.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ SECTIONS
8787
/* Start of init data section */
8888
__init_data_begin = .;
8989
INIT_DATA_SECTION(16)
90+
.init.bss : {
91+
*(.init.bss) /* from the EFI stub */
92+
}
9093
.exit.data :
9194
{
9295
EXIT_DATA

0 commit comments

Comments
 (0)