Skip to content

Commit c1aac64

Browse files
masahir0yardbiesheuvel
authored andcommitted
efi/libstub/arm64: link stub lib.a conditionally
Since commit 799c434 ("kbuild: thin archives make default for all archs"), core-y is passed to the linker with --whole-archive. Hence, the whole of stub library is linked to vmlinux. Use libs-y so that lib.a is passed after --no-whole-archive for conditional linking. The unused drivers/firmware/efi/libstub/relocate.o will be dropped for ARCH=arm64. Signed-off-by: Masahiro Yamada <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent 59476f8 commit c1aac64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export TEXT_OFFSET
143143

144144
core-y += arch/arm64/
145145
libs-y := arch/arm64/lib/ $(libs-y)
146-
core-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
146+
libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
147147

148148
# Default target when executing plain make
149149
boot := arch/arm64/boot

0 commit comments

Comments
 (0)