path: root/spl/Makefile
diff options
authorMarek Vasut <>2012-10-19 05:00:10 +0000
committerTom Rini <>2012-10-22 08:29:29 -0700
commit97b24d3d51a92cb8c0c1e1a74abf22fe1a1807a3 (patch)
tree2c8a4ea2c41b9e09482857d68557d45692754f8d /spl/Makefile
parent047cea3655cf34ce1f911c282e82598ded998dd2 (diff)
common: Add symbol handling for generic lists into Makefile
This patch adds essential components for generation of the contents of the linker section that is used by the linker-generated array. All of the contents is held in a separate file, u-boot.lst, which is generated at runtime just before U-Boot is linked. The purpose of this code is to especially generate the appropriate boundary symbols around each subsection in the section carrying the linker-generated arrays. Obviously, the interim linker code for actual placement of the variables into the section is generated too. The generated file, u-boot.lst, is included into via the linker INCLUDE directive in . Adjustments are made in the Makefile and spl/Makefile so that the and depend on their respective .lst files. Signed-off-by: Marek Vasut <> Cc: Joe Hershberger <> Cc: Mike Frysinger <> Acked-by: Joe Hershberger <> Tested-by: Joe Hershberger <>
Diffstat (limited to 'spl/Makefile')
1 files changed, 6 insertions, 2 deletions
diff --git a/spl/Makefile b/spl/Makefile
index 92267d6dea..20a943c14d 100644
--- a/spl/Makefile
+++ b/spl/Makefile
@@ -154,8 +154,12 @@ $(START): depend
$(LIBS): depend
$(MAKE) -C $(SRCTREE)$(dir $(subst $(SPLTREE),,$@))
-$(obj) $(LDSCRIPT) depend
- $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - < $< > $@
+# The following line expands into whole rule which generates u-boot.lst,
+# the file containing u-boots LG-array linker section. This is included into
+# $(LDSCRIPT). The function make_u_boot_list is defined in file.
+$(eval $(call make_u_boot_list, $(obj)u-boot.lst, $(LIBS)))
+$(obj) $(LDSCRIPT) $(obj)u-boot.lst depend
+ $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj). -ansi -D__ASSEMBLY__ -P - < $< > $@
depend: $(obj).depend
.PHONY: depend
OpenPOWER on IntegriCloud