mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
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 u-boot.lds via the linker INCLUDE directive in u-boot.lds . Adjustments are made in the Makefile and spl/Makefile so that the u-boot.lds and u-boot-spl.lds depend on their respective .lst files. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Tested-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
1
spl/.gitignore
vendored
1
spl/.gitignore
vendored
@ -2,3 +2,4 @@ u-boot-spl
|
||||
u-boot-spl.bin
|
||||
u-boot-spl.lds
|
||||
u-boot-spl.map
|
||||
u-boot.lst
|
||||
|
||||
@ -154,8 +154,12 @@ $(START): depend
|
||||
$(LIBS): depend
|
||||
$(MAKE) -C $(SRCTREE)$(dir $(subst $(SPLTREE),,$@))
|
||||
|
||||
$(obj)u-boot-spl.lds: $(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 helper.mk file.
|
||||
$(eval $(call make_u_boot_list, $(obj)u-boot.lst, $(LIBS)))
|
||||
$(obj)u-boot-spl.lds: $(LDSCRIPT) $(obj)u-boot.lst depend
|
||||
$(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj). -ansi -D__ASSEMBLY__ -P - < $< > $@
|
||||
|
||||
depend: $(obj).depend
|
||||
.PHONY: depend
|
||||
|
||||
Reference in New Issue
Block a user