Skip to content

Commit

Permalink
riscv: vmlinux.lds.S: explicitly catch .init.bss sections from EFI stub
Browse files Browse the repository at this point in the history
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 <jszhang@kernel.org>
Link: https://lore.kernel.org/r/20230119155417.2600-5-jszhang@kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
  • Loading branch information
xhackerustc authored and palmer-dabbelt committed Feb 22, 2023
1 parent b13e64d commit 0ed0031
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/riscv/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ SECTIONS
/* Start of init data section */
__init_data_begin = .;
INIT_DATA_SECTION(16)
.init.bss : {
*(.init.bss) /* from the EFI stub */
}
.exit.data :
{
EXIT_DATA
Expand Down

0 comments on commit 0ed0031

Please sign in to comment.