Add --gc-sections to help reduce the size of the EFI app. Add a check for undefined symbols too, since using these can hang or crash the app.
Signed-off-by: Simon Glass <s...@chromium.org> --- arch/x86/config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/config.mk b/arch/x86/config.mk index ac1f1922b12..0deea05c15f 100644 --- a/arch/x86/config.mk +++ b/arch/x86/config.mk @@ -77,7 +77,7 @@ CPPFLAGS_crt0-efi-$(EFIARCH).o += $(CFLAGS_EFI) ifeq ($(CONFIG_EFI_APP),y) PLATFORM_CPPFLAGS += $(CFLAGS_EFI) -LDFLAGS_FINAL += -znocombreloc -shared +LDFLAGS_FINAL += -znocombreloc -shared --gc-sections --no-undefined LDSCRIPT := $(LDSCRIPT_EFI) else -- 2.43.0