]> git.baikalelectronics.ru Git - kernel.git/commit
efi/libstub: Avoid linking libstub/lib-ksyms.o into vmlinux
authorMasahiro Yamada <masahiroy@kernel.org>
Sun, 8 Mar 2020 08:08:53 +0000 (09:08 +0100)
committerIngo Molnar <mingo@kernel.org>
Sun, 8 Mar 2020 09:00:06 +0000 (10:00 +0100)
commit4f165575e5b38a046097a7f2429a8f0acd73040b
treef1bc583fdf7fbced35baa01eadfce70beef61f31
parentd1923cbefee4110d2987d00e3878803118921ec9
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:

  79a3dcdcab85 ("[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 <masahiroy@kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
[ardb: update commit log to clarify that arm64 deviates in this respect]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20200305055047.6097-1-masahiroy@kernel.org
Link: https://lore.kernel.org/r/20200308080859.21568-23-ardb@kernel.org
drivers/firmware/efi/Makefile