[U-Boot] [PATCH v4 2/5] spl: don't mark __u_boot_cmd* as undefined

Ilya Yanok ilya.yanok at cogentembedded.com
Sun Aug 5 23:21:50 CEST 2012


__u_boot_cmd* symbols are not used in SPL so there is no need
to tell the linker that they are undefined. With these symbols
marked as undefined linker fails to garbage collect some unused
functions and even fails to build the resulting image.

Signed-off-by: Ilya Yanok <ilya.yanok at cogentembedded.com>
---

 spl/Makefile |    2 --
 1 file changed, 2 deletions(-)

diff --git a/spl/Makefile b/spl/Makefile
index ea7d475..8576d56 100644
--- a/spl/Makefile
+++ b/spl/Makefile
@@ -126,8 +126,6 @@ $(obj)u-boot-spl.bin:	$(obj)u-boot-spl
 	$(OBJCOPY) $(OBJCFLAGS) -O binary $< $@
 
 GEN_UBOOT = \
-	UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) | \
-	sed  -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
 	cd $(obj) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) $$UNDEF_SYM $(__START) \
 		--start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
 		-Map u-boot-spl.map -o u-boot-spl
-- 
1.7.9.5



More information about the U-Boot mailing list