
From: Simon Glass <sjg@chromium.org> This option is used on most other boards. Leaving it disabled creates situations where the linker fails to build, due to symbols which are referenced only it code that would have been garbage-collected. To keep this disabled we would need to introduce #ifdefs not needed by other platforms, which would be annoying. The only current reason why this cannot be enabled is that the linker lists are lost. Add a KEEP() around these, and enable the option. Signed-off-by: Simon Glass <sjg@chromium.org> --- arch/arm/config.mk | 2 -- arch/arm/lib/elf_aarch64_efi.lds | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/config.mk b/arch/arm/config.mk index 783d2cda0b9..8a0167c165d 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -14,10 +14,8 @@ CFLAGS_NON_EFI := -fno-pic $(FIXED_REG) -ffunction-sections -fdata-sections \ CFLAGS_EFI := -fpic -fshort-wchar ifneq ($(LTO_ENABLE)$(CONFIG_USE_PRIVATE_LIBGCC),yy) -ifndef CONFIG_EFI_APP LDFLAGS_FINAL += --gc-sections endif -endif ifneq ($(LTO_ENABLE),y) PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections diff --git a/arch/arm/lib/elf_aarch64_efi.lds b/arch/arm/lib/elf_aarch64_efi.lds index 2241bea4dc1..cb7081abef5 100644 --- a/arch/arm/lib/elf_aarch64_efi.lds +++ b/arch/arm/lib/elf_aarch64_efi.lds @@ -46,7 +46,7 @@ SECTIONS *(.got) /* U-Boot lists and device tree */ . = ALIGN(8); - *(SORT(__u_boot_list*)); + KEEP(*(SORT(__u_boot_list*))); . = ALIGN(8); /* -- 2.43.0