Refactor linker-generated arrays

Refactor linker-generated array code so that symbols
which were previously linker-generated are now compiler-
generated. This causes relocation records of type
R_ARM_ABS32 to become R_ARM_RELATIVE, which makes
code which uses LGA able to run before relocation as
well as after.

Note: this affects more than ARM targets, as linker-
lists span possibly all target architectures, notably
PowerPC.

Conflicts:
	arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds
	arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds
	arch/arm/cpu/armv7/omap-common/u-boot-spl.lds
	board/ait/cam_enc_4xx/u-boot-spl.lds
	board/davinci/da8xxevm/u-boot-spl-da850evm.lds
	board/davinci/da8xxevm/u-boot-spl-hawk.lds
	board/vpac270/u-boot-spl.lds

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
This commit is contained in:
Albert ARIBAUD 2013-02-25 00:59:00 +00:00
parent 3ebd1cbc49
commit ef123c5253
177 changed files with 380 additions and 351 deletions

1
.gitignore vendored
View File

@ -44,7 +44,6 @@
/u-boot.dtb
/u-boot.sb
/u-boot.geany
/include/u-boot.lst
#
# Generated files

View File

@ -556,10 +556,8 @@ GEN_UBOOT = \
$(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map -o u-boot
else
GEN_UBOOT = \
UNDEF_LST=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
sed -n -e 's/.*\($(SYM_PREFIX)_u_boot_list_.*\)/-u\1/p'|sort|uniq`;\
cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \
$$UNDEF_LST $(__OBJS) \
$(__OBJS) \
--start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
-Map u-boot.map -o u-boot
endif
@ -592,11 +590,7 @@ $(SUBDIR_EXAMPLES): $(obj)u-boot
$(LDSCRIPT): depend
$(MAKE) -C $(dir $@) $(notdir $@)
# 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)include/u-boot.lst, $(LIBBOARD) $(LIBS)))
$(obj)u-boot.lds: $(LDSCRIPT) $(obj)include/u-boot.lst
$(obj)u-boot.lds: $(LDSCRIPT)
$(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$< >$@
nand_spl: $(TIMESTAMP_FILE) $(VERSION_FILE) depend
@ -832,7 +826,6 @@ clean:
$(obj)board/matrix_vision/*/bootscript.img \
$(obj)board/voiceblue/eeprom \
$(obj)u-boot.lds \
$(obj)include/u-boot.lst \
$(obj)arch/blackfin/cpu/bootrom-asm-offsets.[chs] \
$(obj)arch/blackfin/cpu/init.{lds,elf}
@rm -f $(obj)include/bmp_logo.h
@ -870,7 +863,7 @@ clobber: tidy
@rm -f $(obj)nand_spl/{u-boot.{lds,lst},System.map}
@rm -f $(obj)nand_spl/{u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map}
@rm -f $(obj)spl/{u-boot-spl,u-boot-spl.bin,u-boot-spl.map}
@rm -f $(obj)spl/{u-boot-spl.lds,u-boot.lst}
@rm -f $(obj)spl/u-boot-spl.lds
@rm -f $(obj)MLO MLO.byteswap
@rm -f $(obj)SPL
@rm -f $(obj)tools/xway-swap-bytes

View File

@ -51,7 +51,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = ALIGN(4);

View File

@ -49,7 +49,7 @@ SECTIONS
.data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
} >.sram
. = ALIGN(4);

View File

@ -49,7 +49,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = ALIGN(4);

View File

@ -52,7 +52,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = ALIGN(4);

View File

@ -50,7 +50,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = ALIGN(4);

View File

@ -114,7 +114,7 @@ SECTIONS
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
} >ram_data
.text_l1 :

View File

@ -54,7 +54,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
.bss ALIGN(0x4):

View File

@ -64,7 +64,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = ALIGN(4);

View File

@ -55,7 +55,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = ALIGN(4);

View File

@ -48,7 +48,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
/* INIT DATA sections - "Small" data (see the gcc -G option)

View File

@ -65,7 +65,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -60,7 +60,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -68,7 +68,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -68,7 +68,7 @@ SECTIONS
. = .;
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -63,7 +63,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -62,7 +62,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -63,7 +63,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -62,7 +62,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -61,7 +61,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -72,7 +72,7 @@ SECTIONS
. = .;
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -54,7 +54,7 @@ SECTIONS
_edata = .;
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = ALIGN(8);

View File

@ -80,7 +80,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -67,7 +67,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -81,7 +81,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -27,7 +27,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
__u_boot_sandbox_option_start = .;

View File

@ -74,7 +74,7 @@ SECTIONS
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
PROVIDE (reloc_dst_end = .);

View File

@ -80,7 +80,7 @@ SECTIONS
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
PROVIDE (reloc_dst_end = .);

View File

@ -77,7 +77,7 @@ SECTIONS
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
PROVIDE (reloc_dst_end = .);

View File

@ -36,7 +36,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = ALIGN(4);

View File

@ -68,7 +68,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -89,7 +89,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -69,7 +69,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -109,7 +109,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -69,7 +69,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -109,7 +109,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -69,7 +69,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -109,7 +109,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -74,7 +74,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -57,7 +57,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = ALIGN (4);

View File

@ -57,7 +57,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = ALIGN (4);

View File

@ -57,7 +57,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = ALIGN (4);

View File

@ -65,7 +65,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -49,7 +49,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
/* INIT DATA sections - "Small" data (see the gcc -G option)

View File

@ -74,7 +74,7 @@ SECTIONS
. = .;
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -75,7 +75,7 @@ SECTIONS
. = .;
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -75,7 +75,7 @@ SECTIONS
. = .;
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -74,7 +74,7 @@ SECTIONS
. = .;
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -75,7 +75,7 @@ SECTIONS
. = .;
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -66,7 +66,7 @@ SECTIONS
. = .;
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -72,7 +72,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -71,7 +71,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -73,7 +73,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -109,7 +109,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -109,7 +109,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -77,7 +77,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -57,7 +57,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = ALIGN (4);

View File

@ -69,7 +69,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -109,7 +109,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -70,7 +70,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -65,7 +65,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -76,7 +76,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -104,7 +104,7 @@ SECTIONS
. = .;
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -68,7 +68,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -77,7 +77,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -73,7 +73,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -71,7 +71,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -69,7 +69,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -109,7 +109,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -72,7 +72,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -71,7 +71,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -71,7 +71,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -71,7 +71,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -72,7 +72,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -71,7 +71,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -71,7 +71,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -71,7 +71,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -71,7 +71,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -71,7 +71,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -74,7 +74,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -72,7 +72,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -72,7 +72,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -69,7 +69,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -69,7 +69,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -69,7 +69,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -69,7 +69,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -69,7 +69,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -60,7 +60,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = ALIGN(4);

View File

@ -88,7 +88,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
.data :

View File

@ -88,7 +88,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
.data :

View File

@ -88,7 +88,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
.data :

View File

@ -87,7 +87,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
.data :

View File

@ -87,7 +87,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
.data :

View File

@ -73,7 +73,7 @@ SECTIONS
. = .;
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}
. = .;

View File

@ -74,7 +74,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -83,7 +83,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -110,7 +110,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -75,7 +75,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

View File

@ -109,7 +109,7 @@ SECTIONS
. = ALIGN(4);
.u_boot_list : {
#include <u-boot.lst>
KEEP(*(SORT(.u_boot_list*)));
}

Some files were not shown because too many files have changed in this diff Show More