Skip to content

Commit 2fb2c17

Browse files
masahir0yIngo Molnar
authored andcommitted
efi/libstub: Avoid linking libstub/lib-ksyms.o into vmlinux
drivers/firmware/efi/libstub/Makefile builds a static library, which is not linked into the main vmlinux target in the ordinary way [arm64], or at all [ARM, x86]. Since commit: 7f2084f ("[kbuild] handle exports in lib-y objects reliably") any Makefile using lib-y generates lib-ksyms.o which is linked into vmlinux. In this case, the following garbage object is linked into vmlinux. drivers/firmware/efi/libstub/lib-ksyms.o We do not want to follow the default linking rules for static libraries built under libstub/ so using subdir-y instead of obj-y is the correct way to descend into this directory. Signed-off-by: Masahiro Yamada <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> [ardb: update commit log to clarify that arm64 deviates in this respect] Signed-off-by: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected]
1 parent 57648ad commit 2fb2c17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/firmware/efi/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ obj-$(CONFIG_EFI_VARS_PSTORE) += efi-pstore.o
2020
obj-$(CONFIG_UEFI_CPER) += cper.o
2121
obj-$(CONFIG_EFI_RUNTIME_MAP) += runtime-map.o
2222
obj-$(CONFIG_EFI_RUNTIME_WRAPPERS) += runtime-wrappers.o
23-
obj-$(CONFIG_EFI_STUB) += libstub/
23+
subdir-$(CONFIG_EFI_STUB) += libstub
2424
obj-$(CONFIG_EFI_FAKE_MEMMAP) += fake_map.o
2525
obj-$(CONFIG_EFI_BOOTLOADER_CONTROL) += efibc.o
2626
obj-$(CONFIG_EFI_TEST) += test/

0 commit comments

Comments
 (0)