[PATCH 01/12] Makefile: Keep symbols in u-boot-init with LTO

Simon Glass sjg at chromium.org
Tue Dec 28 09:28:43 CET 2021


At present linker-list symbols in the u-boot-init group (e.g. start.o)
are silent discarded with LTO enabled. Fix this so that it is possible
to declare lists here also.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 074ba7349f2..73894c80004 100644
--- a/Makefile
+++ b/Makefile
@@ -1744,7 +1744,7 @@ quiet_cmd_keep_syms_lto_cc = KSLCC   $@
       cmd_keep_syms_lto_cc = \
 	$(CC) $(filter-out $(LTO_CFLAGS),$(c_flags)) -c -o $@ $<
 
-$(u-boot-keep-syms-lto_c): $(u-boot-main)
+$(u-boot-keep-syms-lto_c): $(u-boot-main) $(u-boot-init)
 	$(call if_changed,keep_syms_lto)
 $(u-boot-keep-syms-lto): $(u-boot-keep-syms-lto_c)
 	$(call if_changed,keep_syms_lto_cc)
-- 
2.34.1.448.ga2b2bfdf31-goog



More information about the U-Boot mailing list