Commit ef123c525370463254a6f8e67563fdb0b0b46412

Authored by Albert ARIBAUD
1 parent 3ebd1cbc49

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>

Showing 177 changed files with 380 additions and 351 deletions Side-by-side Diff

... ... @@ -44,7 +44,6 @@
44 44 /u-boot.dtb
45 45 /u-boot.sb
46 46 /u-boot.geany
47   -/include/u-boot.lst
48 47  
49 48 #
50 49 # Generated files
... ... @@ -556,10 +556,8 @@
556 556 $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map -o u-boot
557 557 else
558 558 GEN_UBOOT = \
559   - UNDEF_LST=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
560   - sed -n -e 's/.*\($(SYM_PREFIX)_u_boot_list_.*\)/-u\1/p'|sort|uniq`;\
561 559 cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \
562   - $$UNDEF_LST $(__OBJS) \
  560 + $(__OBJS) \
563 561 --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
564 562 -Map u-boot.map -o u-boot
565 563 endif
... ... @@ -592,11 +590,7 @@
592 590 $(LDSCRIPT): depend
593 591 $(MAKE) -C $(dir $@) $(notdir $@)
594 592  
595   -# The following line expands into whole rule which generates u-boot.lst,
596   -# the file containing u-boots LG-array linker section. This is included into
597   -# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
598   -$(eval $(call make_u_boot_list, $(obj)include/u-boot.lst, $(LIBBOARD) $(LIBS)))
599   -$(obj)u-boot.lds: $(LDSCRIPT) $(obj)include/u-boot.lst
  593 +$(obj)u-boot.lds: $(LDSCRIPT)
600 594 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$< >$@
601 595  
602 596 nand_spl: $(TIMESTAMP_FILE) $(VERSION_FILE) depend
... ... @@ -832,7 +826,6 @@
832 826 $(obj)board/matrix_vision/*/bootscript.img \
833 827 $(obj)board/voiceblue/eeprom \
834 828 $(obj)u-boot.lds \
835   - $(obj)include/u-boot.lst \
836 829 $(obj)arch/blackfin/cpu/bootrom-asm-offsets.[chs] \
837 830 $(obj)arch/blackfin/cpu/init.{lds,elf}
838 831 @rm -f $(obj)include/bmp_logo.h
... ... @@ -870,7 +863,7 @@
870 863 @rm -f $(obj)nand_spl/{u-boot.{lds,lst},System.map}
871 864 @rm -f $(obj)nand_spl/{u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map}
872 865 @rm -f $(obj)spl/{u-boot-spl,u-boot-spl.bin,u-boot-spl.map}
873   - @rm -f $(obj)spl/{u-boot-spl.lds,u-boot.lst}
  866 + @rm -f $(obj)spl/u-boot-spl.lds
874 867 @rm -f $(obj)MLO MLO.byteswap
875 868 @rm -f $(obj)SPL
876 869 @rm -f $(obj)tools/xway-swap-bytes
arch/arm/cpu/arm920t/ep93xx/u-boot.lds
... ... @@ -51,7 +51,7 @@
51 51  
52 52 . = ALIGN(4);
53 53 .u_boot_list : {
54   - #include <u-boot.lst>
  54 + KEEP(*(SORT(.u_boot_list*)));
55 55 }
56 56  
57 57 . = ALIGN(4);
arch/arm/cpu/armv7/am33xx/u-boot-spl.lds
... ... @@ -49,7 +49,7 @@
49 49 .data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
50 50  
51 51 .u_boot_list : {
52   - #include <u-boot.lst>
  52 + KEEP(*(SORT(.u_boot_list*)));
53 53 } >.sram
54 54  
55 55 . = ALIGN(4);
arch/arm/cpu/ixp/u-boot.lds
... ... @@ -49,7 +49,7 @@
49 49  
50 50 . = ALIGN(4);
51 51 .u_boot_list : {
52   - #include <u-boot.lst>
  52 + KEEP(*(SORT(.u_boot_list*)));
53 53 }
54 54  
55 55 . = ALIGN(4);
arch/arm/cpu/u-boot.lds
... ... @@ -52,7 +52,7 @@
52 52  
53 53 . = ALIGN(4);
54 54 .u_boot_list : {
55   - #include <u-boot.lst>
  55 + KEEP(*(SORT(.u_boot_list*)));
56 56 }
57 57  
58 58 . = ALIGN(4);
arch/avr32/cpu/u-boot.lds
... ... @@ -50,7 +50,7 @@
50 50  
51 51 . = ALIGN(4);
52 52 .u_boot_list : {
53   - #include <u-boot.lst>
  53 + KEEP(*(SORT(.u_boot_list*)));
54 54 }
55 55  
56 56 . = ALIGN(4);
arch/blackfin/cpu/u-boot.lds
... ... @@ -114,7 +114,7 @@
114 114  
115 115  
116 116 .u_boot_list : {
117   - #include <u-boot.lst>
  117 + KEEP(*(SORT(.u_boot_list*)));
118 118 } >ram_data
119 119  
120 120 .text_l1 :
arch/microblaze/cpu/u-boot.lds
... ... @@ -54,7 +54,7 @@
54 54  
55 55 . = ALIGN(4);
56 56 .u_boot_list : {
57   - #include <u-boot.lst>
  57 + KEEP(*(SORT(.u_boot_list*)));
58 58 }
59 59  
60 60 .bss ALIGN(0x4):
arch/mips/cpu/u-boot.lds
... ... @@ -64,7 +64,7 @@
64 64  
65 65 . = ALIGN(4);
66 66 .u_boot_list : {
67   - #include <u-boot.lst>
  67 + KEEP(*(SORT(.u_boot_list*)));
68 68 }
69 69  
70 70 . = ALIGN(4);
arch/nds32/cpu/n1213/u-boot.lds
... ... @@ -55,7 +55,7 @@
55 55  
56 56 . = ALIGN(4);
57 57 .u_boot_list : {
58   - #include <u-boot.lst>
  58 + KEEP(*(SORT(.u_boot_list*)));
59 59 }
60 60  
61 61 . = ALIGN(4);
arch/nios2/cpu/u-boot.lds
... ... @@ -48,7 +48,7 @@
48 48  
49 49 . = ALIGN(4);
50 50 .u_boot_list : {
51   - #include <u-boot.lst>
  51 + KEEP(*(SORT(.u_boot_list*)));
52 52 }
53 53  
54 54 /* INIT DATA sections - "Small" data (see the gcc -G option)
arch/powerpc/cpu/74xx_7xx/u-boot.lds
... ... @@ -65,7 +65,7 @@
65 65  
66 66 . = ALIGN(4);
67 67 .u_boot_list : {
68   - #include <u-boot.lst>
  68 + KEEP(*(SORT(.u_boot_list*)));
69 69 }
70 70  
71 71  
arch/powerpc/cpu/mpc512x/u-boot.lds
... ... @@ -60,7 +60,7 @@
60 60  
61 61 . = ALIGN(4);
62 62 .u_boot_list : {
63   - #include <u-boot.lst>
  63 + KEEP(*(SORT(.u_boot_list*)));
64 64 }
65 65  
66 66  
arch/powerpc/cpu/mpc5xx/u-boot.lds
... ... @@ -68,7 +68,7 @@
68 68  
69 69 . = ALIGN(4);
70 70 .u_boot_list : {
71   - #include <u-boot.lst>
  71 + KEEP(*(SORT(.u_boot_list*)));
72 72 }
73 73  
74 74  
arch/powerpc/cpu/mpc5xxx/u-boot-customlayout.lds
... ... @@ -68,7 +68,7 @@
68 68 . = .;
69 69  
70 70 .u_boot_list : {
71   - #include <u-boot.lst>
  71 + KEEP(*(SORT(.u_boot_list*)));
72 72 }
73 73  
74 74 . = .;
arch/powerpc/cpu/mpc5xxx/u-boot.lds
... ... @@ -63,7 +63,7 @@
63 63  
64 64 . = ALIGN(4);
65 65 .u_boot_list : {
66   - #include <u-boot.lst>
  66 + KEEP(*(SORT(.u_boot_list*)));
67 67 }
68 68  
69 69  
arch/powerpc/cpu/mpc8220/u-boot.lds
... ... @@ -62,7 +62,7 @@
62 62  
63 63 . = ALIGN(4);
64 64 .u_boot_list : {
65   - #include <u-boot.lst>
  65 + KEEP(*(SORT(.u_boot_list*)));
66 66 }
67 67  
68 68  
arch/powerpc/cpu/mpc824x/u-boot.lds
... ... @@ -63,7 +63,7 @@
63 63  
64 64 . = ALIGN(4);
65 65 .u_boot_list : {
66   - #include <u-boot.lst>
  66 + KEEP(*(SORT(.u_boot_list*)));
67 67 }
68 68  
69 69  
arch/powerpc/cpu/mpc8260/u-boot.lds
... ... @@ -62,7 +62,7 @@
62 62  
63 63 . = ALIGN(4);
64 64 .u_boot_list : {
65   - #include <u-boot.lst>
  65 + KEEP(*(SORT(.u_boot_list*)));
66 66 }
67 67  
68 68  
arch/powerpc/cpu/mpc83xx/u-boot.lds
... ... @@ -61,7 +61,7 @@
61 61  
62 62 . = ALIGN(4);
63 63 .u_boot_list : {
64   - #include <u-boot.lst>
  64 + KEEP(*(SORT(.u_boot_list*)));
65 65 }
66 66  
67 67  
arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
... ... @@ -72,7 +72,7 @@
72 72 . = .;
73 73  
74 74 .u_boot_list : {
75   - #include <u-boot.lst>
  75 + KEEP(*(SORT(.u_boot_list*)));
76 76 }
77 77  
78 78 . = .;
arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds
... ... @@ -54,7 +54,7 @@
54 54 _edata = .;
55 55  
56 56 .u_boot_list : {
57   - #include <u-boot.lst>
  57 + KEEP(*(SORT(.u_boot_list*)));
58 58 }
59 59  
60 60 . = ALIGN(8);
arch/powerpc/cpu/mpc85xx/u-boot.lds
... ... @@ -80,7 +80,7 @@
80 80  
81 81 . = ALIGN(4);
82 82 .u_boot_list : {
83   - #include <u-boot.lst>
  83 + KEEP(*(SORT(.u_boot_list*)));
84 84 }
85 85  
86 86 . = .;
arch/powerpc/cpu/mpc86xx/u-boot.lds
... ... @@ -67,7 +67,7 @@
67 67  
68 68 . = ALIGN(4);
69 69 .u_boot_list : {
70   - #include <u-boot.lst>
  70 + KEEP(*(SORT(.u_boot_list*)));
71 71 }
72 72  
73 73 . = .;
arch/powerpc/cpu/ppc4xx/u-boot.lds
... ... @@ -81,7 +81,7 @@
81 81  
82 82 . = ALIGN(4);
83 83 .u_boot_list : {
84   - #include <u-boot.lst>
  84 + KEEP(*(SORT(.u_boot_list*)));
85 85 }
86 86  
87 87 . = .;
arch/sandbox/cpu/u-boot.lds
... ... @@ -27,7 +27,7 @@
27 27  
28 28 . = ALIGN(4);
29 29 .u_boot_list : {
30   - #include <u-boot.lst>
  30 + KEEP(*(SORT(.u_boot_list*)));
31 31 }
32 32  
33 33 __u_boot_sandbox_option_start = .;
arch/sh/cpu/sh2/u-boot.lds
... ... @@ -74,7 +74,7 @@
74 74  
75 75  
76 76 .u_boot_list : {
77   - #include <u-boot.lst>
  77 + KEEP(*(SORT(.u_boot_list*)));
78 78 }
79 79  
80 80 PROVIDE (reloc_dst_end = .);
arch/sh/cpu/sh3/u-boot.lds
... ... @@ -80,7 +80,7 @@
80 80  
81 81  
82 82 .u_boot_list : {
83   - #include <u-boot.lst>
  83 + KEEP(*(SORT(.u_boot_list*)));
84 84 }
85 85  
86 86 PROVIDE (reloc_dst_end = .);
arch/sh/cpu/sh4/u-boot.lds
... ... @@ -77,7 +77,7 @@
77 77  
78 78  
79 79 .u_boot_list : {
80   - #include <u-boot.lst>
  80 + KEEP(*(SORT(.u_boot_list*)));
81 81 }
82 82  
83 83 PROVIDE (reloc_dst_end = .);
arch/x86/cpu/u-boot.lds
... ... @@ -36,7 +36,7 @@
36 36  
37 37 . = ALIGN(4);
38 38 .u_boot_list : {
39   - #include <u-boot.lst>
  39 + KEEP(*(SORT(.u_boot_list*)));
40 40 }
41 41  
42 42 . = ALIGN(4);
board/BuS/eb_cpu5282/u-boot.lds
... ... @@ -68,7 +68,7 @@
68 68  
69 69 . = ALIGN(4);
70 70 .u_boot_list : {
71   - #include <u-boot.lst>
  71 + KEEP(*(SORT(.u_boot_list*)));
72 72 }
73 73  
74 74 . = .;
board/LEOX/elpt860/u-boot.lds
... ... @@ -89,7 +89,7 @@
89 89  
90 90 . = ALIGN(4);
91 91 .u_boot_list : {
92   - #include <u-boot.lst>
  92 + KEEP(*(SORT(.u_boot_list*)));
93 93 }
94 94  
95 95 . = .;
board/RPXClassic/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/RPXClassic/u-boot.lds.debug
... ... @@ -109,7 +109,7 @@
109 109  
110 110 . = ALIGN(4);
111 111 .u_boot_list : {
112   - #include <u-boot.lst>
  112 + KEEP(*(SORT(.u_boot_list*)));
113 113 }
114 114  
115 115  
board/RPXlite/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/RPXlite/u-boot.lds.debug
... ... @@ -109,7 +109,7 @@
109 109  
110 110 . = ALIGN(4);
111 111 .u_boot_list : {
112   - #include <u-boot.lst>
  112 + KEEP(*(SORT(.u_boot_list*)));
113 113 }
114 114  
115 115  
board/RPXlite_dw/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/RPXlite_dw/u-boot.lds.debug
... ... @@ -109,7 +109,7 @@
109 109  
110 110 . = ALIGN(4);
111 111 .u_boot_list : {
112   - #include <u-boot.lst>
  112 + KEEP(*(SORT(.u_boot_list*)));
113 113 }
114 114  
115 115  
board/RRvision/u-boot.lds
... ... @@ -74,7 +74,7 @@
74 74  
75 75 . = ALIGN(4);
76 76 .u_boot_list : {
77   - #include <u-boot.lst>
  77 + KEEP(*(SORT(.u_boot_list*)));
78 78 }
79 79  
80 80  
board/actux1/u-boot.lds
... ... @@ -57,7 +57,7 @@
57 57  
58 58 . = ALIGN(4);
59 59 .u_boot_list : {
60   - #include <u-boot.lst>
  60 + KEEP(*(SORT(.u_boot_list*)));
61 61 }
62 62  
63 63 . = ALIGN (4);
board/actux2/u-boot.lds
... ... @@ -57,7 +57,7 @@
57 57  
58 58 . = ALIGN(4);
59 59 .u_boot_list : {
60   - #include <u-boot.lst>
  60 + KEEP(*(SORT(.u_boot_list*)));
61 61 }
62 62  
63 63 . = ALIGN (4);
board/actux3/u-boot.lds
... ... @@ -57,7 +57,7 @@
57 57  
58 58 . = ALIGN(4);
59 59 .u_boot_list : {
60   - #include <u-boot.lst>
  60 + KEEP(*(SORT(.u_boot_list*)));
61 61 }
62 62  
63 63 . = ALIGN (4);
board/adder/u-boot.lds
... ... @@ -65,7 +65,7 @@
65 65  
66 66 . = ALIGN(4);
67 67 .u_boot_list : {
68   - #include <u-boot.lst>
  68 + KEEP(*(SORT(.u_boot_list*)));
69 69 }
70 70  
71 71  
board/altera/nios2-generic/u-boot.lds
... ... @@ -49,7 +49,7 @@
49 49  
50 50 . = ALIGN(4);
51 51 .u_boot_list : {
52   - #include <u-boot.lst>
  52 + KEEP(*(SORT(.u_boot_list*)));
53 53 }
54 54  
55 55 /* INIT DATA sections - "Small" data (see the gcc -G option)
board/amcc/acadia/u-boot-nand.lds
... ... @@ -74,7 +74,7 @@
74 74 . = .;
75 75  
76 76 .u_boot_list : {
77   - #include <u-boot.lst>
  77 + KEEP(*(SORT(.u_boot_list*)));
78 78 }
79 79  
80 80 . = .;
board/amcc/bamboo/u-boot-nand.lds
... ... @@ -75,7 +75,7 @@
75 75 . = .;
76 76  
77 77 .u_boot_list : {
78   - #include <u-boot.lst>
  78 + KEEP(*(SORT(.u_boot_list*)));
79 79 }
80 80  
81 81 . = .;
board/amcc/canyonlands/u-boot-nand.lds
... ... @@ -75,7 +75,7 @@
75 75 . = .;
76 76  
77 77 .u_boot_list : {
78   - #include <u-boot.lst>
  78 + KEEP(*(SORT(.u_boot_list*)));
79 79 }
80 80  
81 81 . = .;
board/amcc/kilauea/u-boot-nand.lds
... ... @@ -74,7 +74,7 @@
74 74 . = .;
75 75  
76 76 .u_boot_list : {
77   - #include <u-boot.lst>
  77 + KEEP(*(SORT(.u_boot_list*)));
78 78 }
79 79  
80 80 . = .;
board/amcc/sequoia/u-boot-nand.lds
... ... @@ -75,7 +75,7 @@
75 75 . = .;
76 76  
77 77 .u_boot_list : {
78   - #include <u-boot.lst>
  78 + KEEP(*(SORT(.u_boot_list*)));
79 79 }
80 80  
81 81 . = .;
board/amcc/sequoia/u-boot-ram.lds
... ... @@ -66,7 +66,7 @@
66 66 . = .;
67 67  
68 68 .u_boot_list : {
69   - #include <u-boot.lst>
  69 + KEEP(*(SORT(.u_boot_list*)));
70 70 }
71 71  
72 72 . = .;
board/astro/mcf5373l/u-boot.lds
... ... @@ -72,7 +72,7 @@
72 72  
73 73 . = ALIGN(4);
74 74 .u_boot_list : {
75   - #include <u-boot.lst>
  75 + KEEP(*(SORT(.u_boot_list*)));
76 76 }
77 77  
78 78 . = .;
board/cobra5272/u-boot.lds
... ... @@ -71,7 +71,7 @@
71 71  
72 72 . = ALIGN(4);
73 73 .u_boot_list : {
74   - #include <u-boot.lst>
  74 + KEEP(*(SORT(.u_boot_list*)));
75 75 }
76 76  
77 77 . = .;
board/cogent/u-boot.lds
... ... @@ -73,7 +73,7 @@
73 73  
74 74 . = ALIGN(4);
75 75 .u_boot_list : {
76   - #include <u-boot.lst>
  76 + KEEP(*(SORT(.u_boot_list*)));
77 77 }
78 78  
79 79  
board/cogent/u-boot.lds.debug
... ... @@ -109,7 +109,7 @@
109 109  
110 110 . = ALIGN(4);
111 111 .u_boot_list : {
112   - #include <u-boot.lst>
  112 + KEEP(*(SORT(.u_boot_list*)));
113 113 }
114 114  
115 115  
board/cray/L1/u-boot.lds.debug
... ... @@ -109,7 +109,7 @@
109 109  
110 110 . = ALIGN(4);
111 111 .u_boot_list : {
112   - #include <u-boot.lst>
  112 + KEEP(*(SORT(.u_boot_list*)));
113 113 }
114 114  
115 115  
board/dave/PPChameleonEVB/u-boot.lds
... ... @@ -77,7 +77,7 @@
77 77  
78 78 . = ALIGN(4);
79 79 .u_boot_list : {
80   - #include <u-boot.lst>
  80 + KEEP(*(SORT(.u_boot_list*)));
81 81 }
82 82  
83 83 . = .;
board/dvlhost/u-boot.lds
... ... @@ -57,7 +57,7 @@
57 57  
58 58 . = ALIGN(4);
59 59 .u_boot_list : {
60   - #include <u-boot.lst>
  60 + KEEP(*(SORT(.u_boot_list*)));
61 61 }
62 62  
63 63 . = ALIGN (4);
board/eltec/mhpc/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/eltec/mhpc/u-boot.lds.debug
... ... @@ -109,7 +109,7 @@
109 109  
110 110 . = ALIGN(4);
111 111 .u_boot_list : {
112   - #include <u-boot.lst>
  112 + KEEP(*(SORT(.u_boot_list*)));
113 113 }
114 114  
115 115  
board/emk/top860/u-boot.lds
... ... @@ -70,7 +70,7 @@
70 70  
71 71 . = ALIGN(4);
72 72 .u_boot_list : {
73   - #include <u-boot.lst>
  73 + KEEP(*(SORT(.u_boot_list*)));
74 74 }
75 75  
76 76  
board/ep88x/u-boot.lds
... ... @@ -65,7 +65,7 @@
65 65  
66 66 . = ALIGN(4);
67 67 .u_boot_list : {
68   - #include <u-boot.lst>
  68 + KEEP(*(SORT(.u_boot_list*)));
69 69 }
70 70  
71 71  
board/esd/dasa_sim/u-boot.lds
... ... @@ -76,7 +76,7 @@
76 76  
77 77 . = ALIGN(4);
78 78 .u_boot_list : {
79   - #include <u-boot.lst>
  79 + KEEP(*(SORT(.u_boot_list*)));
80 80 }
81 81  
82 82  
board/esd/pmc440/u-boot-nand.lds
... ... @@ -104,7 +104,7 @@
104 104 . = .;
105 105  
106 106 .u_boot_list : {
107   - #include <u-boot.lst>
  107 + KEEP(*(SORT(.u_boot_list*)));
108 108 }
109 109  
110 110 . = .;
board/esd/tasreg/u-boot.lds
... ... @@ -68,7 +68,7 @@
68 68  
69 69 . = ALIGN(4);
70 70 .u_boot_list : {
71   - #include <u-boot.lst>
  71 + KEEP(*(SORT(.u_boot_list*)));
72 72 }
73 73  
74 74 . = .;
board/esteem192e/u-boot.lds
... ... @@ -77,7 +77,7 @@
77 77  
78 78 . = ALIGN(4);
79 79 .u_boot_list : {
80   - #include <u-boot.lst>
  80 + KEEP(*(SORT(.u_boot_list*)));
81 81 }
82 82  
83 83  
board/evb64260/u-boot.lds
... ... @@ -73,7 +73,7 @@
73 73  
74 74 . = ALIGN(4);
75 75 .u_boot_list : {
76   - #include <u-boot.lst>
  76 + KEEP(*(SORT(.u_boot_list*)));
77 77 }
78 78  
79 79  
board/fads/u-boot.lds
... ... @@ -71,7 +71,7 @@
71 71  
72 72 . = ALIGN(4);
73 73 .u_boot_list : {
74   - #include <u-boot.lst>
  74 + KEEP(*(SORT(.u_boot_list*)));
75 75 }
76 76  
77 77  
board/flagadm/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/flagadm/u-boot.lds.debug
... ... @@ -109,7 +109,7 @@
109 109  
110 110 . = ALIGN(4);
111 111 .u_boot_list : {
112   - #include <u-boot.lst>
  112 + KEEP(*(SORT(.u_boot_list*)));
113 113 }
114 114  
115 115  
board/freescale/m5208evbe/u-boot.lds
... ... @@ -72,7 +72,7 @@
72 72  
73 73 . = ALIGN(4);
74 74 .u_boot_list : {
75   - #include <u-boot.lst>
  75 + KEEP(*(SORT(.u_boot_list*)));
76 76 }
77 77  
78 78 . = .;
board/freescale/m52277evb/u-boot.lds
... ... @@ -71,7 +71,7 @@
71 71  
72 72 . = ALIGN(4);
73 73 .u_boot_list : {
74   - #include <u-boot.lst>
  74 + KEEP(*(SORT(.u_boot_list*)));
75 75 }
76 76  
77 77 . = .;
board/freescale/m5235evb/u-boot.lds
... ... @@ -71,7 +71,7 @@
71 71  
72 72 . = ALIGN(4);
73 73 .u_boot_list : {
74   - #include <u-boot.lst>
  74 + KEEP(*(SORT(.u_boot_list*)));
75 75 }
76 76  
77 77 . = .;
board/freescale/m5249evb/u-boot.lds
... ... @@ -71,7 +71,7 @@
71 71  
72 72 . = ALIGN(4);
73 73 .u_boot_list : {
74   - #include <u-boot.lst>
  74 + KEEP(*(SORT(.u_boot_list*)));
75 75 }
76 76  
77 77 . = .;
board/freescale/m5253demo/u-boot.lds
... ... @@ -72,7 +72,7 @@
72 72  
73 73 . = ALIGN(4);
74 74 .u_boot_list : {
75   - #include <u-boot.lst>
  75 + KEEP(*(SORT(.u_boot_list*)));
76 76 }
77 77  
78 78 . = .;
board/freescale/m5253evbe/u-boot.lds
... ... @@ -71,7 +71,7 @@
71 71  
72 72 . = ALIGN(4);
73 73 .u_boot_list : {
74   - #include <u-boot.lst>
  74 + KEEP(*(SORT(.u_boot_list*)));
75 75 }
76 76  
77 77 . = .;
board/freescale/m5271evb/u-boot.lds
... ... @@ -71,7 +71,7 @@
71 71  
72 72 . = ALIGN(4);
73 73 .u_boot_list : {
74   - #include <u-boot.lst>
  74 + KEEP(*(SORT(.u_boot_list*)));
75 75 }
76 76  
77 77 . = .;
board/freescale/m5272c3/u-boot.lds
... ... @@ -71,7 +71,7 @@
71 71  
72 72 . = ALIGN(4);
73 73 .u_boot_list : {
74   - #include <u-boot.lst>
  74 + KEEP(*(SORT(.u_boot_list*)));
75 75 }
76 76  
77 77 . = .;
board/freescale/m5275evb/u-boot.lds
... ... @@ -71,7 +71,7 @@
71 71  
72 72 . = ALIGN(4);
73 73 .u_boot_list : {
74   - #include <u-boot.lst>
  74 + KEEP(*(SORT(.u_boot_list*)));
75 75 }
76 76  
77 77 . = .;
board/freescale/m5282evb/u-boot.lds
... ... @@ -71,7 +71,7 @@
71 71  
72 72 . = ALIGN(4);
73 73 .u_boot_list : {
74   - #include <u-boot.lst>
  74 + KEEP(*(SORT(.u_boot_list*)));
75 75 }
76 76  
77 77 . = .;
board/freescale/m53017evb/u-boot.lds
... ... @@ -74,7 +74,7 @@
74 74  
75 75 . = ALIGN(4);
76 76 .u_boot_list : {
77   - #include <u-boot.lst>
  77 + KEEP(*(SORT(.u_boot_list*)));
78 78 }
79 79  
80 80 . = .;
board/freescale/m5329evb/u-boot.lds
... ... @@ -72,7 +72,7 @@
72 72  
73 73 . = ALIGN(4);
74 74 .u_boot_list : {
75   - #include <u-boot.lst>
  75 + KEEP(*(SORT(.u_boot_list*)));
76 76 }
77 77  
78 78 . = .;
board/freescale/m5373evb/u-boot.lds
... ... @@ -72,7 +72,7 @@
72 72  
73 73 . = ALIGN(4);
74 74 .u_boot_list : {
75   - #include <u-boot.lst>
  75 + KEEP(*(SORT(.u_boot_list*)));
76 76 }
77 77  
78 78 . = .;
board/freescale/m54418twr/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75 . = .;
board/freescale/m54451evb/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75 . = .;
board/freescale/m54455evb/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75 . = .;
board/freescale/m547xevb/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75 . = .;
board/freescale/m548xevb/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75 . = .;
board/freescale/mx31ads/u-boot.lds
... ... @@ -60,7 +60,7 @@
60 60  
61 61 . = ALIGN(4);
62 62 .u_boot_list : {
63   - #include <u-boot.lst>
  63 + KEEP(*(SORT(.u_boot_list*)));
64 64 }
65 65  
66 66 . = ALIGN(4);
board/gaisler/gr_cpci_ax2000/u-boot.lds
... ... @@ -88,7 +88,7 @@
88 88  
89 89 . = ALIGN(4);
90 90 .u_boot_list : {
91   - #include <u-boot.lst>
  91 + KEEP(*(SORT(.u_boot_list*)));
92 92 }
93 93  
94 94 .data :
board/gaisler/gr_ep2s60/u-boot.lds
... ... @@ -88,7 +88,7 @@
88 88  
89 89 . = ALIGN(4);
90 90 .u_boot_list : {
91   - #include <u-boot.lst>
  91 + KEEP(*(SORT(.u_boot_list*)));
92 92 }
93 93  
94 94 .data :
board/gaisler/gr_xc3s_1500/u-boot.lds
... ... @@ -88,7 +88,7 @@
88 88  
89 89 . = ALIGN(4);
90 90 .u_boot_list : {
91   - #include <u-boot.lst>
  91 + KEEP(*(SORT(.u_boot_list*)));
92 92 }
93 93  
94 94 .data :
board/gaisler/grsim/u-boot.lds
... ... @@ -87,7 +87,7 @@
87 87  
88 88 . = ALIGN(4);
89 89 .u_boot_list : {
90   - #include <u-boot.lst>
  90 + KEEP(*(SORT(.u_boot_list*)));
91 91 }
92 92  
93 93 .data :
board/gaisler/grsim_leon2/u-boot.lds
... ... @@ -87,7 +87,7 @@
87 87  
88 88 . = ALIGN(4);
89 89 .u_boot_list : {
90   - #include <u-boot.lst>
  90 + KEEP(*(SORT(.u_boot_list*)));
91 91 }
92 92  
93 93 .data :
board/gen860t/u-boot-flashenv.lds
... ... @@ -73,7 +73,7 @@
73 73 . = .;
74 74  
75 75 .u_boot_list : {
76   - #include <u-boot.lst>
  76 + KEEP(*(SORT(.u_boot_list*)));
77 77 }
78 78  
79 79 . = .;
board/gen860t/u-boot.lds
... ... @@ -74,7 +74,7 @@
74 74  
75 75 . = ALIGN(4);
76 76 .u_boot_list : {
77   - #include <u-boot.lst>
  77 + KEEP(*(SORT(.u_boot_list*)));
78 78 }
79 79  
80 80  
board/genietv/u-boot.lds
... ... @@ -83,7 +83,7 @@
83 83  
84 84 . = ALIGN(4);
85 85 .u_boot_list : {
86   - #include <u-boot.lst>
  86 + KEEP(*(SORT(.u_boot_list*)));
87 87 }
88 88  
89 89  
board/genietv/u-boot.lds.debug
... ... @@ -110,7 +110,7 @@
110 110  
111 111 . = ALIGN(4);
112 112 .u_boot_list : {
113   - #include <u-boot.lst>
  113 + KEEP(*(SORT(.u_boot_list*)));
114 114 }
115 115  
116 116  
board/hermes/u-boot.lds
... ... @@ -75,7 +75,7 @@
75 75  
76 76 . = ALIGN(4);
77 77 .u_boot_list : {
78   - #include <u-boot.lst>
  78 + KEEP(*(SORT(.u_boot_list*)));
79 79 }
80 80  
81 81  
board/hermes/u-boot.lds.debug
... ... @@ -109,7 +109,7 @@
109 109  
110 110 . = ALIGN(4);
111 111 .u_boot_list : {
112   - #include <u-boot.lst>
  112 + KEEP(*(SORT(.u_boot_list*)));
113 113 }
114 114  
115 115  
board/hymod/u-boot.lds
... ... @@ -113,7 +113,7 @@
113 113  
114 114 . = ALIGN(4);
115 115 .u_boot_list : {
116   - #include <u-boot.lst>
  116 + KEEP(*(SORT(.u_boot_list*)));
117 117 }
118 118  
119 119  
board/hymod/u-boot.lds.debug
... ... @@ -109,7 +109,7 @@
109 109  
110 110 . = ALIGN(4);
111 111 .u_boot_list : {
112   - #include <u-boot.lst>
  112 + KEEP(*(SORT(.u_boot_list*)));
113 113 }
114 114  
115 115  
board/icu862/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/icu862/u-boot.lds.debug
... ... @@ -110,7 +110,7 @@
110 110  
111 111 . = ALIGN(4);
112 112 .u_boot_list : {
113   - #include <u-boot.lst>
  113 + KEEP(*(SORT(.u_boot_list*)));
114 114 }
115 115  
116 116  
board/idmr/u-boot.lds
... ... @@ -68,7 +68,7 @@
68 68  
69 69 . = ALIGN(4);
70 70 .u_boot_list : {
71   - #include <u-boot.lst>
  71 + KEEP(*(SORT(.u_boot_list*)));
72 72 }
73 73  
74 74 . = .;
board/ip860/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/ip860/u-boot.lds.debug
... ... @@ -110,7 +110,7 @@
110 110  
111 111 . = ALIGN(4);
112 112 .u_boot_list : {
113   - #include <u-boot.lst>
  113 + KEEP(*(SORT(.u_boot_list*)));
114 114 }
115 115  
116 116  
board/ivm/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/ivm/u-boot.lds.debug
... ... @@ -110,7 +110,7 @@
110 110  
111 111 . = ALIGN(4);
112 112 .u_boot_list : {
113   - #include <u-boot.lst>
  113 + KEEP(*(SORT(.u_boot_list*)));
114 114 }
115 115  
116 116  
board/korat/u-boot-F7FC.lds
... ... @@ -110,7 +110,7 @@
110 110 . = .;
111 111  
112 112 .u_boot_list : {
113   - #include <u-boot.lst>
  113 + KEEP(*(SORT(.u_boot_list*)));
114 114 }
115 115  
116 116 . = .;
board/kup/kup4k/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/kup/kup4k/u-boot.lds.debug
... ... @@ -109,7 +109,7 @@
109 109  
110 110 . = ALIGN(4);
111 111 .u_boot_list : {
112   - #include <u-boot.lst>
  112 + KEEP(*(SORT(.u_boot_list*)));
113 113 }
114 114  
115 115  
board/kup/kup4x/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/kup/kup4x/u-boot.lds.debug
... ... @@ -109,7 +109,7 @@
109 109  
110 110 . = ALIGN(4);
111 111 .u_boot_list : {
112   - #include <u-boot.lst>
  112 + KEEP(*(SORT(.u_boot_list*)));
113 113 }
114 114  
115 115  
board/lwmon/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/lwmon/u-boot.lds.debug
... ... @@ -110,7 +110,7 @@
110 110  
111 111 . = ALIGN(4);
112 112 .u_boot_list : {
113   - #include <u-boot.lst>
  113 + KEEP(*(SORT(.u_boot_list*)));
114 114 }
115 115  
116 116  
board/manroland/uc100/u-boot.lds
... ... @@ -72,7 +72,7 @@
72 72  
73 73 . = ALIGN(4);
74 74 .u_boot_list : {
75   - #include <u-boot.lst>
  75 + KEEP(*(SORT(.u_boot_list*)));
76 76 }
77 77  
78 78  
board/matrix_vision/mvsmr/u-boot.lds
... ... @@ -77,7 +77,7 @@
77 77  
78 78 . = ALIGN(4);
79 79 .u_boot_list : {
80   - #include <u-boot.lst>
  80 + KEEP(*(SORT(.u_boot_list*)));
81 81 }
82 82  
83 83  
board/mbx8xx/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/mbx8xx/u-boot.lds.debug
... ... @@ -110,7 +110,7 @@
110 110  
111 111 . = ALIGN(4);
112 112 .u_boot_list : {
113   - #include <u-boot.lst>
  113 + KEEP(*(SORT(.u_boot_list*)));
114 114 }
115 115  
116 116  
board/mousse/u-boot.lds
... ... @@ -63,7 +63,7 @@
63 63  
64 64 . = ALIGN(4);
65 65 .u_boot_list : {
66   - #include <u-boot.lst>
  66 + KEEP(*(SORT(.u_boot_list*)));
67 67 }
68 68  
69 69  
board/mpl/pip405/u-boot.lds.debug
... ... @@ -109,7 +109,7 @@
109 109  
110 110 . = ALIGN(4);
111 111 .u_boot_list : {
112   - #include <u-boot.lst>
  112 + KEEP(*(SORT(.u_boot_list*)));
113 113 }
114 114  
115 115  
board/mvblue/u-boot.lds
... ... @@ -73,7 +73,7 @@
73 73  
74 74 . = ALIGN(4);
75 75 .u_boot_list : {
76   - #include <u-boot.lst>
  76 + KEEP(*(SORT(.u_boot_list*)));
77 77 }
78 78  
79 79  
board/netphone/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/netphone/u-boot.lds.debug
... ... @@ -109,7 +109,7 @@
109 109  
110 110 . = ALIGN(4);
111 111 .u_boot_list : {
112   - #include <u-boot.lst>
  112 + KEEP(*(SORT(.u_boot_list*)));
113 113 }
114 114  
115 115  
board/netta/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/netta/u-boot.lds.debug
... ... @@ -109,7 +109,7 @@
109 109  
110 110 . = ALIGN(4);
111 111 .u_boot_list : {
112   - #include <u-boot.lst>
  112 + KEEP(*(SORT(.u_boot_list*)));
113 113 }
114 114  
115 115  
board/netta2/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/netta2/u-boot.lds.debug
... ... @@ -109,7 +109,7 @@
109 109  
110 110 . = ALIGN(4);
111 111 .u_boot_list : {
112   - #include <u-boot.lst>
  112 + KEEP(*(SORT(.u_boot_list*)));
113 113 }
114 114  
115 115  
board/netvia/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/netvia/u-boot.lds.debug
... ... @@ -109,7 +109,7 @@
109 109  
110 110 . = ALIGN(4);
111 111 .u_boot_list : {
112   - #include <u-boot.lst>
  112 + KEEP(*(SORT(.u_boot_list*)));
113 113 }
114 114  
115 115  
board/nx823/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/nx823/u-boot.lds.debug
... ... @@ -109,7 +109,7 @@
109 109  
110 110 . = ALIGN(4);
111 111 .u_boot_list : {
112   - #include <u-boot.lst>
  112 + KEEP(*(SORT(.u_boot_list*)));
113 113 }
114 114  
115 115  
board/openrisc/openrisc-generic/u-boot.lds
... ... @@ -29,7 +29,7 @@
29 29  
30 30 . = ALIGN(4);
31 31 .u_boot_list : {
32   - #include <u-boot.lst>
  32 + KEEP(*(SORT(.u_boot_list*)));
33 33 }
34 34  
35 35 .rodata : {
board/quantum/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/r360mpi/u-boot.lds
... ... @@ -71,7 +71,7 @@
71 71  
72 72 . = ALIGN(4);
73 73 .u_boot_list : {
74   - #include <u-boot.lst>
  74 + KEEP(*(SORT(.u_boot_list*)));
75 75 }
76 76  
77 77  
board/rbc823/u-boot.lds
... ... @@ -80,7 +80,7 @@
80 80  
81 81 . = ALIGN(4);
82 82 .u_boot_list : {
83   - #include <u-boot.lst>
  83 + KEEP(*(SORT(.u_boot_list*)));
84 84 }
85 85  
86 86 . = .;
board/renesas/sh7752evb/u-boot.lds
... ... @@ -78,7 +78,7 @@
78 78 PROVIDE (_egot = .);
79 79  
80 80 .u_boot_list : {
81   - #include <u-boot.lst>
  81 + KEEP(*(SORT(.u_boot_list*)));
82 82 }
83 83  
84 84 PROVIDE (reloc_dst_end = .);
board/renesas/sh7757lcr/u-boot.lds
... ... @@ -79,7 +79,7 @@
79 79  
80 80  
81 81 .u_boot_list : {
82   - #include <u-boot.lst>
  82 + KEEP(*(SORT(.u_boot_list*)));
83 83 }
84 84  
85 85 PROVIDE (reloc_dst_end = .);
board/rsdproto/u-boot.lds
... ... @@ -100,7 +100,7 @@
100 100  
101 101 . = ALIGN(4);
102 102 .u_boot_list : {
103   - #include <u-boot.lst>
  103 + KEEP(*(SORT(.u_boot_list*)));
104 104 }
105 105  
106 106  
board/samsung/smdk5250/smdk5250-uboot-spl.lds
... ... @@ -49,7 +49,7 @@
49 49 . = ALIGN(4);
50 50  
51 51 .u_boot_list : {
52   - #include <u-boot.lst>
  52 + KEEP(*(SORT(.u_boot_list*)));
53 53 } >.sram
54 54 . = ALIGN(4);
55 55  
board/samsung/smdk6400/u-boot-nand.lds
... ... @@ -50,7 +50,7 @@
50 50  
51 51 . = align(4);
52 52 .u_boot_list : {
53   - #include <u-boot.lst>
  53 + KEEP(*(SORT(.u_boot_list*)));
54 54 }
55 55  
56 56 . = align(4);
board/sandburst/karef/u-boot.lds.debug
... ... @@ -118,7 +118,7 @@
118 118  
119 119 . = ALIGN(4);
120 120 .u_boot_list : {
121   - #include <u-boot.lst>
  121 + KEEP(*(SORT(.u_boot_list*)));
122 122 }
123 123  
124 124  
board/sandburst/metrobox/u-boot.lds.debug
... ... @@ -118,7 +118,7 @@
118 118  
119 119 . = ALIGN(4);
120 120 .u_boot_list : {
121   - #include <u-boot.lst>
  121 + KEEP(*(SORT(.u_boot_list*)));
122 122 }
123 123  
124 124  
board/sandpoint/u-boot.lds
... ... @@ -71,7 +71,7 @@
71 71  
72 72 . = ALIGN(4);
73 73 .u_boot_list : {
74   - #include <u-boot.lst>
  74 + KEEP(*(SORT(.u_boot_list*)));
75 75 }
76 76  
77 77  
board/sixnet/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/snmc/qs850/u-boot.lds
... ... @@ -72,7 +72,7 @@
72 72  
73 73 . = ALIGN(4);
74 74 .u_boot_list : {
75   - #include <u-boot.lst>
  75 + KEEP(*(SORT(.u_boot_list*)));
76 76 }
77 77  
78 78  
board/snmc/qs860t/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/spc1920/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/spd8xx/u-boot.lds
... ... @@ -78,7 +78,7 @@
78 78  
79 79 . = ALIGN(4);
80 80 .u_boot_list : {
81   - #include <u-boot.lst>
  81 + KEEP(*(SORT(.u_boot_list*)));
82 82 }
83 83  
84 84  
board/spd8xx/u-boot.lds.debug
... ... @@ -110,7 +110,7 @@
110 110  
111 111 . = ALIGN(4);
112 112 .u_boot_list : {
113   - #include <u-boot.lst>
  113 + KEEP(*(SORT(.u_boot_list*)));
114 114 }
115 115  
116 116  
board/stx/stxxtc/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/stx/stxxtc/u-boot.lds.debug
... ... @@ -109,7 +109,7 @@
109 109  
110 110 . = ALIGN(4);
111 111 .u_boot_list : {
112   - #include <u-boot.lst>
  112 + KEEP(*(SORT(.u_boot_list*)));
113 113 }
114 114  
115 115  
board/svm_sc8xx/u-boot.lds
... ... @@ -86,7 +86,7 @@
86 86  
87 87 . = ALIGN(4);
88 88 .u_boot_list : {
89   - #include <u-boot.lst>
  89 + KEEP(*(SORT(.u_boot_list*)));
90 90 }
91 91  
92 92  
board/tqc/tqm8xx/u-boot.lds
... ... @@ -82,7 +82,7 @@
82 82  
83 83 . = ALIGN(4);
84 84 .u_boot_list : {
85   - #include <u-boot.lst>
  85 + KEEP(*(SORT(.u_boot_list*)));
86 86 }
87 87  
88 88  
board/v37/u-boot.lds
... ... @@ -69,7 +69,7 @@
69 69  
70 70 . = ALIGN(4);
71 71 .u_boot_list : {
72   - #include <u-boot.lst>
  72 + KEEP(*(SORT(.u_boot_list*)));
73 73 }
74 74  
75 75  
board/w7o/u-boot.lds.debug
... ... @@ -109,7 +109,7 @@
109 109  
110 110 . = ALIGN(4);
111 111 .u_boot_list : {
112   - #include <u-boot.lst>
  112 + KEEP(*(SORT(.u_boot_list*)));
113 113 }
114 114  
115 115  
board/xes/xpedite1000/u-boot.lds.debug
... ... @@ -114,7 +114,7 @@
114 114  
115 115 . = ALIGN(4);
116 116 .u_boot_list : {
117   - #include <u-boot.lst>
  117 + KEEP(*(SORT(.u_boot_list*)));
118 118 }
119 119  
120 120  
... ... @@ -41,7 +41,7 @@
41 41 );
42 42  
43 43 /* This does not use the U_BOOT_CMD macro as ? can't be used in symbol names */
44   -ll_entry_declare(cmd_tbl_t, question_mark, cmd, cmd) = {
  44 +ll_entry_declare(cmd_tbl_t, question_mark, cmd) = {
45 45 "?", CONFIG_SYS_MAXARGS, 1, do_help,
46 46 "alias for 'help'",
47 47 #ifdef CONFIG_SYS_LONGHELP
... ... @@ -23,8 +23,6 @@
23 23  
24 24 #########################################################################
25 25  
26   -include $(TOPDIR)/helper.mk
27   -
28 26 ifeq ($(CURDIR),$(SRCTREE))
29 27 dir :=
30 28 else
... ... @@ -15,25 +15,23 @@
15 15  
16 16 **** Behind the scene ******
17 17  
18   -The structure created is named with a special prefix (__u_boot_list_cmd_)
19   -and placed by the linker in a special section.
  18 +The structure created is named with a special prefix and placed by
  19 +the linker in a special section using the linker lists mechanism
  20 +(see include/linker_lists.h)
20 21  
21 22 This makes it possible for the final link to extract all commands
22 23 compiled into any object code and construct a static array so the
23   -command can be found in an array starting at _u_boot_list_cmd__start.
  24 +command array can be iterated over using the linker lists macros.
24 25  
25   -To ensure that the linker does not discard these symbols when linking
26   -full U-Boot we generate a list of all the commands we have built (based
27   -on the sections mentioned above) and use that to force the linker to
28   -first enter the symbol as undefined in the output object so that there
29   -is then a need for the symbol to be kept (this is the UNDEF_SYM logic in
30   -the Makefile).
  26 +The linker lists feature ensures that the linker does not discard
  27 +these symbols when linking full U-Boot even though they are not
  28 +referenced in the source code as such.
31 29  
32 30 If a new board is defined do not forget to define the command section
33 31 by writing in u-boot.lds ($(TOPDIR)/board/boardname/u-boot.lds) these
34 32 3 lines:
35 33  
36 34 .u_boot_list : {
37   - #include "u-boot.lst";
  35 + KEEP(*(SORT(.u_boot_list*)));
38 36 }
1   -#
2   -# Copyright (C) 2012 Marek Vasut <marex@denx.de>
3   -#
4   -# See file CREDITS for list of people who contributed to this
5   -# project.
6   -#
7   -# This program is free software; you can redistribute it and/or
8   -# modify it under the terms of the GNU General Public License as
9   -# published by the Free Software Foundation; either version 2 of
10   -# the License, or (at your option) any later version.
11   -#
12   -#########################################################################
13   -
14   -##
15   -# make_u_boot_list - Generate contents of u_boot_list section
16   -# 1: The name of the resulting file (usually u-boot.lst)
17   -# 2: Files to analyze for possible u_boot_list entries
18   -#
19   -# This function generates the contents of the u_boot_list section,
20   -# including all the border symbols for it's subsections. The operation
21   -# of this function is as follows, numbering goes per lines:
22   -#
23   -# 1) Dump the ELF header sections from all files supplied via $(2)
24   -# 2) Filter out all other stuff that does not belong into .u_boot_list
25   -# section.
26   -# 3) Fix up the lines so that the resulting output is is in format
27   -# ".u_boot_list.*".
28   -# 4) Remove the last .something$, since that only contains the name
29   -# of the variable to be put into a subsection. This name is irelevant
30   -# for generation of border symbols, thus of no interest, remove it.
31   -# 5) Take each line and for every dot "." in that line, print the whole
32   -# line until that dot "." . This is important so that we have all
33   -# parent border symbols generated as well.
34   -# 6) Load every line and firstly append "\a" at the end and print the
35   -# line. Next, append "@" at the end and print the line. Finally,
36   -# append "~" at the end of line. This will make sense in conjunction
37   -# with 6) and 7).
38   -# 7) Sort the lines. It is imperative to use LC_COLLATE=C here because
39   -# with this, the "\a" symbol is first and "~" symbol is last. Any
40   -# other symbols fall inbetween. Symbols like "@", which marks the
41   -# end of current line (representing current section) and ".", which
42   -# means the line continues and thus represents subsection.
43   -# 8) With such ordering, all lines ending with "\a" will float at the
44   -# begining of all lines with the same prefix. Thus it is easy to
45   -# replace "\a" with __start and make it the __start border symbol.
46   -# Very similarly for "~", which will be always at the bottom and so
47   -# can be replaced by "__end" and made into the __end border symbol.
48   -# Finally, every line ending with "@" symbol will be transformed
49   -# into " *(SORT(${line}*)); " format, which in the linker parlance
50   -# will allow it to trap all symbols relevant to the subsection.
51   -#
52   -define make_u_boot_list
53   -$(1): $(2)
54   - $(OBJDUMP) -h $(2) | \
55   - sed -n -e '/.*\.u_boot_list[^ ]\+/ ! {d;n}' \
56   - -e 's/.*\(\.u_boot_list[^ ]\+\).*$$$$/\1/' \
57   - -e 's/\.[^\.]\+$$$$//' \
58   - -e ':s /^.\+$$$$/ { p;s/^\(.*\)\.[^\.]*$$$$/\1/;b s }' | \
59   - sed -n -e 'h;s/$$$$/\a/p;g;s/$$$$/@/p;g;s/$$$$/~/p;' | \
60   - LC_COLLATE=C sort -u | \
61   - sed -n -e '/\a$$$$/ { s/\./_/g;s/\a$$$$/__start = .;/p; }'\
62   - -e '/~$$$$/ { s/\./_/g;s/~$$$$/__end = .;/p; }'\
63   - -e '/@$$$$/ { s/\(.*\)@$$$$/*(SORT(\1.*));/p }' > $(1)
64   -endef
... ... @@ -175,7 +175,7 @@
175 175 _usage, _help, NULL)
176 176  
177 177 #define U_BOOT_CMD_COMPLETE(_name, _maxargs, _rep, _cmd, _usage, _help, _comp) \
178   - ll_entry_declare(cmd_tbl_t, _name, cmd, cmd) = \
  178 + ll_entry_declare(cmd_tbl_t, _name, cmd) = \
179 179 U_BOOT_CMD_MKENT_COMPLETE(_name, _maxargs, _rep, _cmd, \
180 180 _usage, _help, _comp);
181 181  
include/env_callback.h
... ... @@ -83,7 +83,7 @@
83 83 }
84 84 #else
85 85 #define U_BOOT_ENV_CALLBACK(name, callback) \
86   - ll_entry_declare(struct env_clbk_tbl, name, env_clbk, env_clbk) = \
  86 + ll_entry_declare(struct env_clbk_tbl, name, env_clbk) = \
87 87 {#name, callback}
88 88 #endif
89 89  
include/linker_lists.h
... ... @@ -13,6 +13,96 @@
13 13 * published by the Free Software Foundation; either version 2 of
14 14 * the License, or (at your option) any later version.
15 15 */
  16 +
  17 +/*
  18 + * There is no use in including this from ASM files, but that happens
  19 + * anyway, e.g. PPC kgdb.S includes command.h which incluse us.
  20 + * So just don't define anything when included from ASM.
  21 + */
  22 +
  23 +#if !defined(__ASSEMBLY__)
  24 +
  25 +/**
  26 + * A linker list is constructed by grouping together linker input
  27 + * sections, each containning one entry of the list. Each input section
  28 + * contains a constant initialized variable which holds the entry's
  29 + * content. Linker list input sections are constructed from the list
  30 + * and entry names, plus a prefix which allows grouping all lists
  31 + * together. Assuming _list and _entry are the list and entry names,
  32 + * then the corresponding input section name is
  33 + *
  34 + * _u_boot_list + _2_ + @_list + _2_ + @_entry
  35 + *
  36 + * and the C variable name is
  37 + *
  38 + * .u_boot_list_ + 2_ + @_list + _2_ + @_entry
  39 + *
  40 + * This ensures uniqueness for both input section and C variable name.
  41 + *
  42 + * Note that the names differ only in the first character, "." for the
  43 + * setion and "_" for the variable, so that the linker cannot confuse
  44 + * section and symbol names. From now on, both names will be referred
  45 + * to as
  46 + *
  47 + * %u_boot_list_ + 2_ + @_list + _2_ + @_entry
  48 + *
  49 + * Entry variables need never be referred to directly.
  50 + *
  51 + * The naming scheme for input sections allows grouping all linker lists
  52 + * into a single linker output section and grouping all entries for a
  53 + * single list.
  54 + *
  55 + * Note the two '_2_' constant components in the names: their presence
  56 + * allows putting a start and end symbols around a list, by mapping
  57 + * these symbols to sections names with components "1" (before) and
  58 + * "3" (after) instead of "2" (within).
  59 + * Start and end symbols for a list can generally be defined as
  60 + *
  61 + * %u_boot_list_2_ + @_list + _1_...
  62 + * %u_boot_list_2_ + @_list + _3_...
  63 + *
  64 + * Start and end symbols for the whole of the linker lists area can be
  65 + * defined as
  66 + *
  67 + * %u_boot_list_1_...
  68 + * %u_boot_list_3_...
  69 + *
  70 + * Here is an example of the sorted sections which result from a list
  71 + * "array" made up of three entries : "first", "second" and "third",
  72 + * iterated at least once.
  73 + *
  74 + * .u_boot_list_2_array_1
  75 + * .u_boot_list_2_array_2_first
  76 + * .u_boot_list_2_array_2_second
  77 + * .u_boot_list_2_array_2_third
  78 + * .u_boot_list_2_array_3
  79 + *
  80 + * If lists must be divided into sublists (e.g. for iterating only on
  81 + * part of a list), one can simply give the list a name of the form
  82 + * 'outer_2_inner', where 'outer' is the global list name and 'inner'
  83 + * is the sub-list name. Iterators for the whole list should use the
  84 + * global list name ("outer"); iterators for only a sub-list should use
  85 + * the full sub-list name ("outer_2_inner").
  86 + *
  87 + * Here is an example of the sections generated from a global list
  88 + * named "drivers", two sub-lists named "i2c" and "pci", and iterators
  89 + * defined for the whole list and each sub-list:
  90 + *
  91 + * %u_boot_list_2_drivers_1
  92 + * %u_boot_list_2_drivers_2_i2c_1
  93 + * %u_boot_list_2_drivers_2_i2c_2_first
  94 + * %u_boot_list_2_drivers_2_i2c_2_first
  95 + * %u_boot_list_2_drivers_2_i2c_2_second
  96 + * %u_boot_list_2_drivers_2_i2c_2_third
  97 + * %u_boot_list_2_drivers_2_i2c_3
  98 + * %u_boot_list_2_drivers_2_pci_1
  99 + * %u_boot_list_2_drivers_2_pci_2_first
  100 + * %u_boot_list_2_drivers_2_pci_2_second
  101 + * %u_boot_list_2_drivers_2_pci_2_third
  102 + * %u_boot_list_2_drivers_2_pci_3
  103 + * %u_boot_list_2_drivers_3
  104 + */
  105 +
16 106 #ifndef __LINKER_LISTS_H__
17 107 #define __LINKER_LISTS_H__
18 108  
19 109  
20 110  
21 111  
22 112  
23 113  
24 114  
... ... @@ -20,43 +110,28 @@
20 110 * ll_entry_declare() - Declare linker-generated array entry
21 111 * @_type: Data type of the entry
22 112 * @_name: Name of the entry
23   - * @_section_u: Subsection of u_boot_list in which this entry is placed
24   - * (with underscores instead of dots, for name concatenation)
25   - * @_section_d: Subsection of u_boot_list in which this entry is placed
26   - * (with dots, for section concatenation)
  113 + * @_list: name of the list. Should contain only characters allowed
  114 + * in a C variable name!
27 115 *
28 116 * This macro declares a variable that is placed into a linker-generated
29 117 * array. This is a basic building block for more advanced use of linker-
30 118 * generated arrays. The user is expected to build their own macro wrapper
31 119 * around this one.
32 120 *
33   - * A variable declared using this macro must be compile-time initialized
34   - * and is as such placed into subsection of special section, .u_boot_list.
35   - * The subsection is specified by the _section_[u,d] parameter, see below.
36   - * The base name of the variable is _name, yet the actual variable is
37   - * declared as concatenation of
  121 + * A variable declared using this macro must be compile-time initialized.
38 122 *
39   - * %_u_boot_list_ + @_section_u + _ + @_name
40   - *
41   - * which ensures name uniqueness. This variable shall never be refered
42   - * directly though.
43   - *
44 123 * Special precaution must be made when using this macro:
45   - * 1) The _type must not contain the "static" keyword, otherwise the entry
46   - * is not generated.
47 124 *
48   - * 2) The @_section_u and @_section_d variables must match, the only difference
49   - * is that in @_section_u is every dot "." character present in @_section_d
50   - * replaced by a single underscore "_" character in @_section_u. The actual
51   - * purpose of these parameters is to select proper subsection in the global
52   - * .u_boot_list section.
  125 + * 1) The _type must not contain the "static" keyword, otherwise the
  126 + * entry is generated and can be iterated but is listed in the map
  127 + * file and cannot be retrieved by name.
53 128 *
54   - * 3) In case a section is declared that contains some array elements AND a
55   - * subsection of this section is declared and contains some elements, it is
56   - * imperative that the elements are of the same type.
  129 + * 2) In case a section is declared that contains some array elements AND
  130 + * a subsection of this section is declared and contains some elements,
  131 + * it is imperative that the elements are of the same type.
57 132 *
58 133 * 4) In case an outer section is declared that contains some array elements
59   - * AND am inner subsection of this section is declared and contains some
  134 + * AND an inner subsection of this section is declared and contains some
60 135 * elements, then when traversing the outer section, even the elements of
61 136 * the inner sections are present in the array.
62 137 *
63 138  
64 139  
65 140  
66 141  
67 142  
68 143  
69 144  
70 145  
71 146  
... ... @@ -66,39 +141,71 @@
66 141 * .y = 4,
67 142 * };
68 143 */
69   -#define ll_entry_declare(_type, _name, _section_u, _section_d) \
70   - _type _u_boot_list_##_section_u##_##_name __attribute__(( \
71   - unused, aligned(4), \
72   - section(".u_boot_list."#_section_d"."#_name)))
  144 +#define ll_entry_declare(_type, _name, _list) \
  145 + _type _u_boot_list_2_##_list##_2_##_name __aligned(4) \
  146 + __attribute__((unused, \
  147 + section(".u_boot_list_2_"#_list"_2_"#_name)))
73 148  
74 149 /**
  150 + * We need a 0-byte-size type for iterator symbols, and the compiler
  151 + * does not allow defining objects of C type 'void'. Using an empty
  152 + * struct is allowed by the compiler, but causes gcc versions 4.4 and
  153 + * below to complain about aliasing. Therefore we use the next best
  154 + * thing: zero-sized arrays, which are both 0-byte-size and exempt from
  155 + * aliasing warnings.
  156 + */
  157 +
  158 +/**
75 159 * ll_entry_start() - Point to first entry of linker-generated array
76 160 * @_type: Data type of the entry
77   - * @_section_u: Subsection of u_boot_list in which this entry is placed
78   - * (with underscores instead of dots)
  161 + * @_list: Name of the list in which this entry is placed
79 162 *
80 163 * This function returns (_type *) pointer to the very first entry of a
81 164 * linker-generated array placed into subsection of .u_boot_list section
82   - * specified by _section_u argument.
  165 + * specified by _list argument.
83 166 *
  167 + * Since this macro defines an array start symbol, its leftmost index
  168 + * must be 2 and its rightmost index must be 1.
  169 + *
84 170 * Example:
85 171 * struct my_sub_cmd *msc = ll_entry_start(struct my_sub_cmd, cmd_sub);
86 172 */
87   -#define ll_entry_start(_type, _section_u) \
88   - ({ \
89   - extern _type _u_boot_list_##_section_u##__start; \
90   - _type *_ll_result = &_u_boot_list_##_section_u##__start;\
91   - _ll_result; \
92   - })
  173 +#define ll_entry_start(_type, _list) \
  174 +({ \
  175 + static char start[0] __aligned(4) __attribute__((unused, \
  176 + section(".u_boot_list_2_"#_list"_1"))); \
  177 + (_type *)&start; \
  178 +})
93 179  
94 180 /**
95   - * ll_entry_count() - Return the number of elements in linker-generated array
  181 + * ll_entry_end() - Point after last entry of linker-generated array
96 182 * @_type: Data type of the entry
97   - * @_section_u: Subsection of u_boot_list in which this entry is placed
  183 + * @_list: Name of the list in which this entry is placed
98 184 * (with underscores instead of dots)
99 185 *
  186 + * This function returns (_type *) pointer after the very last entry of
  187 + * a linker-generated array placed into subsection of .u_boot_list
  188 + * section specified by _list argument.
  189 + *
  190 + * Since this macro defines an array end symbol, its leftmost index
  191 + * must be 2 and its rightmost index must be 3.
  192 + *
  193 + * Example:
  194 + * struct my_sub_cmd *msc = ll_entry_end(struct my_sub_cmd, cmd_sub);
  195 + */
  196 +#define ll_entry_end(_type, _list) \
  197 +({ \
  198 + static char end[0] __aligned(4) __attribute__((unused, \
  199 + section(".u_boot_list_2_"#_list"_3"))); \
  200 + (_type *)&end; \
  201 +})
  202 +/**
  203 + * ll_entry_count() - Return the number of elements in linker-generated array
  204 + * @_type: Data type of the entry
  205 + * @_list: Name of the list of which the number of elements is computed
  206 + *
100 207 * This function returns the number of elements of a linker-generated array
101   - * placed into subsection of .u_boot_list section specified by _section_u
  208 + * placed into subsection of .u_boot_list section specified by _list
102 209 * argument. The result is of an unsigned int type.
103 210 *
104 211 * Example:
105 212  
106 213  
107 214  
... ... @@ -108,23 +215,19 @@
108 215 * for (i = 0; i < count; i++, msc++)
109 216 * printf("Entry %i, x=%i y=%i\n", i, msc->x, msc->y);
110 217 */
111   -#define ll_entry_count(_type, _section_u) \
  218 +#define ll_entry_count(_type, _list) \
112 219 ({ \
113   - extern _type _u_boot_list_##_section_u##__start; \
114   - extern _type _u_boot_list_##_section_u##__end; \
115   - unsigned int _ll_result = \
116   - &_u_boot_list_##_section_u##__end - \
117   - &_u_boot_list_##_section_u##__start; \
  220 + _type *start = ll_entry_start(_type, _list); \
  221 + _type *end = ll_entry_end(_type, _list); \
  222 + unsigned int _ll_result = end - start; \
118 223 _ll_result; \
119 224 })
120 225  
121   -
122 226 /**
123 227 * ll_entry_get() - Retrieve entry from linker-generated array by name
124 228 * @_type: Data type of the entry
125 229 * @_name: Name of the entry
126   - * @_section_u: Subsection of u_boot_list in which this entry is placed
127   - * (with underscores instead of dots)
  230 + * @_list: Name of the list in which this entry is placed
128 231 *
129 232 * This function returns a pointer to a particular entry in LG-array
130 233 * identified by the subsection of u_boot_list where the entry resides
131 234  
132 235  
... ... @@ -138,12 +241,55 @@
138 241 * ...
139 242 * struct my_sub_cmd *c = ll_entry_get(struct my_sub_cmd, my_sub_cmd, cmd_sub);
140 243 */
141   -#define ll_entry_get(_type, _name, _section_u) \
  244 +#define ll_entry_get(_type, _name, _list) \
142 245 ({ \
143   - extern _type _u_boot_list_##_section_u##_##_name; \
144   - _type *_ll_result = &_u_boot_list_##_section_u##_##_name;\
  246 + extern _type _u_boot_list_2_##_list##_2_##_name; \
  247 + _type *_ll_result = \
  248 + &_u_boot_list_2_##_list##_2_##_name; \
145 249 _ll_result; \
146 250 })
  251 +
  252 +/**
  253 + * ll_start() - Point to first entry of first linker-generated array
  254 + * @_type: Data type of the entry
  255 + *
  256 + * This function returns (_type *) pointer to the very first entry of
  257 + * the very first linker-generated array.
  258 + *
  259 + * Since this macro defines the start of the linker-generated arrays,
  260 + * its leftmost index must be 1.
  261 + *
  262 + * Example:
  263 + * struct my_sub_cmd *msc = ll_start(struct my_sub_cmd);
  264 + */
  265 +#define ll_start(_type) \
  266 +({ \
  267 + static char start[0] __aligned(4) __attribute__((unused, \
  268 + section(".u_boot_list_1"))); \
  269 + (_type *)&start; \
  270 +})
  271 +
  272 +/**
  273 + * ll_entry_end() - Point after last entry of last linker-generated array
  274 + * @_type: Data type of the entry
  275 + *
  276 + * This function returns (_type *) pointer after the very last entry of
  277 + * the very last linker-generated array.
  278 + *
  279 + * Since this macro defines the end of the linker-generated arrays,
  280 + * its leftmost index must be 3.
  281 + *
  282 + * Example:
  283 + * struct my_sub_cmd *msc = ll_end(struct my_sub_cmd);
  284 + */
  285 +#define ll_end(_type) \
  286 +({ \
  287 + static char end[0] __aligned(4) __attribute__((unused, \
  288 + section(".u_boot_list_3"))); \
  289 + (_type *)&end; \
  290 +})
  291 +
  292 +#endif /* __ASSEMBLY__ */
147 293  
148 294 #endif /* __LINKER_LISTS_H__ */
nand_spl/board/freescale/mpc8536ds/Makefile
... ... @@ -32,7 +32,6 @@
32 32 nandobj := $(OBJTREE)/nand_spl/
33 33  
34 34 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
35   -LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
36 35 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
37 36 $(LDFLAGS) $(LDFLAGS_FINAL)
38 37 AFLAGS += -DCONFIG_NAND_SPL
... ... @@ -62,11 +61,7 @@
62 61 -Map $(nandobj)u-boot-spl.map \
63 62 -o $(nandobj)u-boot-spl
64 63  
65   -# The following line expands into whole rule which generates $(LSTSCRIPT),
66   -# the file containing u-boots LG-array linker section. This is included into
67   -# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
68   -$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
69   -$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT)
  64 +$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
70 65 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
71 66 -ansi -D__ASSEMBLY__ -P - <$< >$@
72 67  
nand_spl/board/freescale/mpc8569mds/Makefile
... ... @@ -32,7 +32,6 @@
32 32 nandobj := $(OBJTREE)/nand_spl/
33 33  
34 34 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
35   -LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
36 35 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
37 36 $(LDFLAGS) $(LDFLAGS_FINAL)
38 37 AFLAGS += -DCONFIG_NAND_SPL
... ... @@ -62,11 +61,7 @@
62 61 -Map $(nandobj)u-boot-spl.map \
63 62 -o $(nandobj)u-boot-spl
64 63  
65   -# The following line expands into whole rule which generates $(LSTSCRIPT),
66   -# the file containing u-boots LG-array linker section. This is included into
67   -# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
68   -$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
69   -$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT)
  64 +$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
70 65 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
71 66 -ansi -D__ASSEMBLY__ -P - <$< >$@
72 67  
nand_spl/board/freescale/mpc8572ds/Makefile
... ... @@ -32,7 +32,6 @@
32 32 nandobj := $(OBJTREE)/nand_spl/
33 33  
34 34 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
35   -LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
36 35 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
37 36 $(LDFLAGS) $(LDFLAGS_FINAL)
38 37 AFLAGS += -DCONFIG_NAND_SPL
... ... @@ -62,11 +61,7 @@
62 61 -Map $(nandobj)u-boot-spl.map \
63 62 -o $(nandobj)u-boot-spl
64 63  
65   -# The following line expands into whole rule which generates $(LSTSCRIPT),
66   -# the file containing u-boots LG-array linker section. This is included into
67   -# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
68   -$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
69   -$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT)
  64 +$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
70 65 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
71 66 -ansi -D__ASSEMBLY__ -P - <$< >$@
72 67  
nand_spl/board/freescale/mx31pdk/Makefile
... ... @@ -6,7 +6,6 @@
6 6 nandobj := $(OBJTREE)/nand_spl/
7 7  
8 8 LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
9   -LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
10 9 LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \
11 10 $(LDFLAGS_FINAL)
12 11 AFLAGS += -DCONFIG_SPL_BUILD -DCONFIG_NAND_SPL
... ... @@ -38,11 +37,7 @@
38 37 -Map $(nandobj)u-boot-spl.map \
39 38 -o $@
40 39  
41   -# The following line expands into whole rule which generates $(LSTSCRIPT),
42   -# the file containing u-boots LG-array linker section. This is included into
43   -# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
44   -$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
45   -$(nandobj)u-boot.lds: $(LDSCRIPT) $(LSTSCRIPT)
  40 +$(nandobj)u-boot.lds: $(LDSCRIPT)
46 41 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
47 42 -ansi -D__ASSEMBLY__ -P - <$< >$@
48 43  
nand_spl/board/freescale/mx31pdk/u-boot.lds
... ... @@ -49,7 +49,7 @@
49 49  
50 50 . = ALIGN(4);
51 51 .u_boot_list : {
52   - #include <u-boot.lst>
  52 + *(SORT(.u_boot_list*));
53 53 }
54 54  
55 55 . = ALIGN(4);
nand_spl/board/freescale/p1010rdb/Makefile
... ... @@ -32,7 +32,6 @@
32 32 nandobj := $(OBJTREE)/nand_spl/
33 33  
34 34 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
35   -LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
36 35 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) $(LDFLAGS) \
37 36 $(LDFLAGS_FINAL)
38 37 AFLAGS += -DCONFIG_NAND_SPL
... ... @@ -62,11 +61,7 @@
62 61 -Map $(nandobj)u-boot-spl.map \
63 62 -o $(nandobj)u-boot-spl
64 63  
65   -# The following line expands into whole rule which generates $(LSTSCRIPT),
66   -# the file containing u-boots LG-array linker section. This is included into
67   -# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
68   -$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
69   -$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT)
  64 +$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
70 65 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)board/$(BOARDDIR) \
71 66 -ansi -D__ASSEMBLY__ -P - <$< >$@
72 67  
nand_spl/board/freescale/p1023rds/Makefile
... ... @@ -27,7 +27,6 @@
27 27 nandobj := $(OBJTREE)/nand_spl/
28 28  
29 29 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
30   -LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
31 30 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
32 31 $(LDFLAGS) $(LDFLAGS_FINAL)
33 32 AFLAGS += -DCONFIG_NAND_SPL
... ... @@ -57,11 +56,7 @@
57 56 -Map $(nandobj)u-boot-spl.map \
58 57 -o $(nandobj)u-boot-spl
59 58  
60   -# The following line expands into whole rule which generates $(LSTSCRIPT),
61   -# the file containing u-boots LG-array linker section. This is included into
62   -# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
63   -$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
64   -$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT)
  59 +$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
65 60 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
66 61 -ansi -D__ASSEMBLY__ -P - <$< >$@
67 62  
nand_spl/board/freescale/p1_p2_rdb/Makefile
... ... @@ -32,7 +32,6 @@
32 32 nandobj := $(OBJTREE)/nand_spl/
33 33  
34 34 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
35   -LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
36 35 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
37 36 $(LDFLAGS) $(LDFLAGS_FINAL)
38 37 AFLAGS += -DCONFIG_NAND_SPL
... ... @@ -62,11 +61,7 @@
62 61 -Map $(nandobj)u-boot-spl.map \
63 62 -o $(nandobj)u-boot-spl
64 63  
65   -# The following line expands into whole rule which generates $(LSTSCRIPT),
66   -# the file containing u-boots LG-array linker section. This is included into
67   -# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
68   -$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
69   -$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT)
  64 +$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
70 65 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
71 66 -ansi -D__ASSEMBLY__ -P - <$< >$@
72 67  
nand_spl/board/karo/tx25/Makefile
... ... @@ -27,7 +27,6 @@
27 27 nandobj := $(OBJTREE)/nand_spl/
28 28  
29 29 LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
30   -LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
31 30 LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \
32 31 $(LDFLAGS_FINAL)
33 32 AFLAGS += -DCONFIG_SPL_BUILD -DCONFIG_NAND_SPL
... ... @@ -59,11 +58,7 @@
59 58 -Map $(nandobj)u-boot-spl.map \
60 59 -o $@
61 60  
62   -# The following line expands into whole rule which generates $(LSTSCRIPT),
63   -# the file containing u-boots LG-array linker section. This is included into
64   -# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
65   -$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
66   -$(nandobj)u-boot.lds: $(LDSCRIPT) $(LSTSCRIPT)
  61 +$(nandobj)u-boot.lds: $(LDSCRIPT)
67 62 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
68 63 -ansi -D__ASSEMBLY__ -P - <$< >$@
69 64  
nand_spl/board/karo/tx25/u-boot.lds
... ... @@ -49,7 +49,7 @@
49 49  
50 50 . = ALIGN(4);
51 51 .u_boot_list : {
52   - #include <u-boot.lst>
  52 + *(SORT(.u_boot_list*));
53 53 }
54 54  
55 55 . = ALIGN(4);
nand_spl/board/samsung/smdk6400/u-boot.lds
... ... @@ -53,7 +53,7 @@
53 53  
54 54 . = ALIGN(4);
55 55 .u_boot_list : {
56   - #include <u-boot.lst>
  56 + *(SORT(.u_boot_list*));
57 57 }
58 58  
59 59 . = ALIGN(4);
... ... @@ -2,5 +2,4 @@
2 2 u-boot-spl.bin
3 3 u-boot-spl.lds
4 4 u-boot-spl.map
5   -u-boot.lst