Commit d0b5d9da5de280120b73e776663f6a3024f225f4
1 parent
62bbc2f25a
Exists in
master
and in
49 other branches
arm: make _end compiler-generated
This prevents references to _end from generating absolute relocation records. This change is binary invariant for ARM targets. Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Showing 22 changed files with 117 additions and 29 deletions Side-by-side Diff
- arch/arm/cpu/arm1136/u-boot-spl.lds
- arch/arm/cpu/arm920t/ep93xx/u-boot.lds
- arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds
- arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds
- arch/arm/cpu/armv7/am33xx/u-boot-spl.lds
- arch/arm/cpu/armv7/omap-common/u-boot-spl.lds
- arch/arm/cpu/armv7/socfpga/u-boot-spl.lds
- arch/arm/cpu/armv7/zynq/u-boot.lds
- arch/arm/cpu/at91-common/u-boot-spl.lds
- arch/arm/cpu/u-boot-spl.lds
- arch/arm/cpu/u-boot.lds
- arch/arm/lib/Makefile
- arch/arm/lib/sections.c
- board/Barix/ipam390/u-boot-spl-ipam390.lds
- board/ait/cam_enc_4xx/u-boot-spl.lds
- board/compulab/cm_t335/u-boot.lds
- board/davinci/da8xxevm/u-boot-spl-da850evm.lds
- board/davinci/da8xxevm/u-boot-spl-hawk.lds
- board/freescale/mx31ads/u-boot.lds
- board/samsung/common/exynos-uboot-spl.lds
- board/ti/am335x/u-boot.lds
- board/vpac270/u-boot-spl.lds
arch/arm/cpu/arm1136/u-boot-spl.lds
arch/arm/cpu/arm920t/ep93xx/u-boot.lds
arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds
... | ... | @@ -49,9 +49,14 @@ |
49 | 49 | __bss_end = .; |
50 | 50 | } |
51 | 51 | |
52 | - _end = .; | |
52 | + .end : | |
53 | + { | |
54 | + *(.__end) | |
55 | + } | |
53 | 56 | |
54 | - .dynsym _end : { *(.dynsym) } | |
57 | + _image_binary_end = .; | |
58 | + | |
59 | + .dynsym _image_binary_end : { *(.dynsym) } | |
55 | 60 | .dynbss : { *(.dynbss) } |
56 | 61 | .dynstr : { *(.dynstr*) } |
57 | 62 | .dynamic : { *(.dynamic*) } |
arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds
... | ... | @@ -49,9 +49,14 @@ |
49 | 49 | __bss_end = .; |
50 | 50 | } |
51 | 51 | |
52 | - _end = .; | |
52 | + .end : | |
53 | + { | |
54 | + *(.__end) | |
55 | + } | |
53 | 56 | |
54 | - .dynsym _end : { *(.dynsym) } | |
57 | + _image_binary_end = .; | |
58 | + | |
59 | + .dynsym _image_binary_end : { *(.dynsym) } | |
55 | 60 | .dynbss : { *(.dynbss) } |
56 | 61 | .dynstr : { *(.dynstr*) } |
57 | 62 | .dynamic : { *(.dynamic*) } |
arch/arm/cpu/armv7/am33xx/u-boot-spl.lds
arch/arm/cpu/armv7/omap-common/u-boot-spl.lds
arch/arm/cpu/armv7/socfpga/u-boot-spl.lds
arch/arm/cpu/armv7/zynq/u-boot.lds
arch/arm/cpu/at91-common/u-boot-spl.lds
arch/arm/cpu/u-boot-spl.lds
... | ... | @@ -42,8 +42,13 @@ |
42 | 42 | __rel_dyn_end = .; |
43 | 43 | } |
44 | 44 | |
45 | - _end = .; | |
45 | + .end : | |
46 | + { | |
47 | + *(.__end) | |
48 | + } | |
46 | 49 | |
50 | + _image_binary_end = .; | |
51 | + | |
47 | 52 | .bss __rel_dyn_start (OVERLAY) : { |
48 | 53 | __bss_start = .; |
49 | 54 | *(.bss*) |
... | ... | @@ -51,7 +56,7 @@ |
51 | 56 | __bss_end = .; |
52 | 57 | } |
53 | 58 | |
54 | - .dynsym _end : { *(.dynsym) } | |
59 | + .dynsym _image_binary_end : { *(.dynsym) } | |
55 | 60 | .dynbss : { *(.dynbss) } |
56 | 61 | .dynstr : { *(.dynstr*) } |
57 | 62 | .dynamic : { *(.dynamic*) } |
arch/arm/cpu/u-boot.lds
... | ... | @@ -60,8 +60,13 @@ |
60 | 60 | *(.__rel_dyn_end) |
61 | 61 | } |
62 | 62 | |
63 | - _end = .; | |
63 | + .end : | |
64 | + { | |
65 | + *(.__end) | |
66 | + } | |
64 | 67 | |
68 | + _image_binary_end = .; | |
69 | + | |
65 | 70 | /* |
66 | 71 | * Deprecated: this MMU section is used by pxa at present but |
67 | 72 | * should not be used by new boards/CPUs. |
... | ... | @@ -91,7 +96,7 @@ |
91 | 96 | KEEP(*(.__bss_end)); |
92 | 97 | } |
93 | 98 | |
94 | - .dynsym _end : { *(.dynsym) } | |
99 | + .dynsym _image_binary_end : { *(.dynsym) } | |
95 | 100 | .dynbss : { *(.dynbss) } |
96 | 101 | .dynstr : { *(.dynstr*) } |
97 | 102 | .dynamic : { *(.dynamic*) } |
arch/arm/lib/Makefile
... | ... | @@ -32,7 +32,6 @@ |
32 | 32 | ifndef CONFIG_SYS_GENERIC_BOARD |
33 | 33 | obj-y += board.o |
34 | 34 | endif |
35 | -obj-y += sections.o | |
36 | 35 | |
37 | 36 | obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o |
38 | 37 | obj-$(CONFIG_CMD_BOOTM) += bootm.o |
... | ... | @@ -43,6 +42,7 @@ |
43 | 42 | obj-$(CONFIG_SPL_FRAMEWORK) += spl.o |
44 | 43 | endif |
45 | 44 | |
45 | +obj-y += sections.o | |
46 | 46 | ifdef CONFIG_ARM64 |
47 | 47 | obj-y += interrupts_64.o |
48 | 48 | else |
arch/arm/lib/sections.c
... | ... | @@ -25,4 +25,5 @@ |
25 | 25 | char __image_copy_end[0] __attribute__((section(".__image_copy_end"))); |
26 | 26 | char __rel_dyn_start[0] __attribute__((section(".__rel_dyn_start"))); |
27 | 27 | char __rel_dyn_end[0] __attribute__((section(".__rel_dyn_end"))); |
28 | +char _end[0] __attribute__((section(".__end"))); |
board/Barix/ipam390/u-boot-spl-ipam390.lds
board/ait/cam_enc_4xx/u-boot-spl.lds
board/compulab/cm_t335/u-boot.lds
... | ... | @@ -61,8 +61,13 @@ |
61 | 61 | *(.__rel_dyn_end) |
62 | 62 | } |
63 | 63 | |
64 | - _end = .; | |
64 | + .end : | |
65 | + { | |
66 | + *(.__end) | |
67 | + } | |
65 | 68 | |
69 | + _image_binary_end = .; | |
70 | + | |
66 | 71 | /* |
67 | 72 | * Deprecated: this MMU section is used by pxa at present but |
68 | 73 | * should not be used by new boards/CPUs. |
... | ... | @@ -92,7 +97,7 @@ |
92 | 97 | KEEP(*(.__bss_end)); |
93 | 98 | } |
94 | 99 | |
95 | - .dynsym _end : { *(.dynsym) } | |
100 | + .dynsym _image_binary_end : { *(.dynsym) } | |
96 | 101 | .hash : { *(.hash) } |
97 | 102 | .got.plt : { *(.got.plt) } |
98 | 103 | .dynbss : { *(.dynbss) } |
board/davinci/da8xxevm/u-boot-spl-da850evm.lds
board/davinci/da8xxevm/u-boot-spl-hawk.lds
board/freescale/mx31ads/u-boot.lds
... | ... | @@ -69,8 +69,13 @@ |
69 | 69 | *(.__rel_dyn_end) |
70 | 70 | } |
71 | 71 | |
72 | - _end = .; | |
72 | + .end : | |
73 | + { | |
74 | + *(.__end) | |
75 | + } | |
73 | 76 | |
77 | + _image_binary_end = .; | |
78 | + | |
74 | 79 | /* |
75 | 80 | * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c |
76 | 81 | * __bss_base and __bss_limit are for linker only (overlay ordering) |
... | ... | @@ -90,7 +95,7 @@ |
90 | 95 | KEEP(*(.__bss_end)); |
91 | 96 | } |
92 | 97 | |
93 | - .dynsym _end : { *(.dynsym) } | |
98 | + .dynsym _image_binary_end : { *(.dynsym) } | |
94 | 99 | .dynbss : { *(.dynbss) } |
95 | 100 | .dynstr : { *(.dynstr*) } |
96 | 101 | .dynamic : { *(.dynamic*) } |
board/samsung/common/exynos-uboot-spl.lds
board/ti/am335x/u-boot.lds
... | ... | @@ -77,8 +77,13 @@ |
77 | 77 | *(.__rel_dyn_end) |
78 | 78 | } |
79 | 79 | |
80 | - _end = .; | |
80 | + .end : | |
81 | + { | |
82 | + *(.__end) | |
83 | + } | |
81 | 84 | |
85 | + _image_binary_end = .; | |
86 | + | |
82 | 87 | /* |
83 | 88 | * Deprecated: this MMU section is used by pxa at present but |
84 | 89 | * should not be used by new boards/CPUs. |
... | ... | @@ -108,7 +113,7 @@ |
108 | 113 | KEEP(*(.__bss_end)); |
109 | 114 | } |
110 | 115 | |
111 | - .dynsym _end : { *(.dynsym) } | |
116 | + .dynsym _image_binary_end : { *(.dynsym) } | |
112 | 117 | .dynbss : { *(.dynbss) } |
113 | 118 | .dynstr : { *(.dynstr*) } |
114 | 119 | .dynamic : { *(.dynamic*) } |
board/vpac270/u-boot-spl.lds
... | ... | @@ -54,8 +54,13 @@ |
54 | 54 | |
55 | 55 | . = ALIGN(0x800); |
56 | 56 | |
57 | - _end = .; | |
57 | + .end : | |
58 | + { | |
59 | + *(.__end) | |
60 | + } | |
58 | 61 | |
62 | + _image_binary_end = .; | |
63 | + | |
59 | 64 | .bss __rel_dyn_start (OVERLAY) : { |
60 | 65 | __bss_start = .; |
61 | 66 | *(.bss*) |
... | ... | @@ -63,7 +68,7 @@ |
63 | 68 | __bss_end = .; |
64 | 69 | } |
65 | 70 | |
66 | - .dynsym _end : { *(.dynsym) } | |
71 | + .dynsym _image_binary_end : { *(.dynsym) } | |
67 | 72 | .dynbss : { *(.dynbss) } |
68 | 73 | .dynstr : { *(.dynstr*) } |
69 | 74 | .dynamic : { *(.dynamic*) } |