This prevents references to _end from generating absolute relocation records.
Signed-off-by: Albert ARIBAUD <albert.u.b...@aribaud.net> --- Changes in v2: None arch/arm/cpu/arm1136/u-boot-spl.lds | 6 +++++- arch/arm/cpu/arm920t/ep93xx/u-boot.lds | 5 ++++- arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds | 5 ++++- arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds | 5 ++++- arch/arm/cpu/armv7/am33xx/u-boot-spl.lds | 6 +++++- arch/arm/cpu/armv7/omap-common/u-boot-spl.lds | 6 +++++- arch/arm/cpu/armv7/socfpga/u-boot-spl.lds | 6 +++++- arch/arm/cpu/ixp/u-boot.lds | 5 ++++- arch/arm/cpu/u-boot-spl.lds | 5 ++++- arch/arm/cpu/u-boot.lds | 5 ++++- arch/arm/lib/Makefile | 2 +- arch/arm/lib/sections.c | 1 + board/actux1/u-boot.lds | 5 ++++- board/actux2/u-boot.lds | 5 ++++- board/actux3/u-boot.lds | 5 ++++- board/ait/cam_enc_4xx/u-boot-spl.lds | 6 +++++- board/davinci/da8xxevm/u-boot-spl-da850evm.lds | 6 +++++- board/davinci/da8xxevm/u-boot-spl-hawk.lds | 5 ++++- board/dvlhost/u-boot.lds | 5 ++++- board/freescale/mx31ads/u-boot.lds | 5 ++++- board/samsung/common/exynos-uboot-spl.lds | 6 +++++- board/ti/am335x/u-boot.lds | 5 ++++- board/vpac270/u-boot-spl.lds | 5 ++++- 23 files changed, 93 insertions(+), 22 deletions(-) diff --git a/arch/arm/cpu/arm1136/u-boot-spl.lds b/arch/arm/cpu/arm1136/u-boot-spl.lds index bccde73..0299902 100644 --- a/arch/arm/cpu/arm1136/u-boot-spl.lds +++ b/arch/arm/cpu/arm1136/u-boot-spl.lds @@ -33,7 +33,11 @@ SECTIONS .data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram . = ALIGN(4); __image_copy_end = .; - _end = .; + + .end : + { + *(.__end) + } .bss : { diff --git a/arch/arm/cpu/arm920t/ep93xx/u-boot.lds b/arch/arm/cpu/arm920t/ep93xx/u-boot.lds index 4bed4fc..9699404 100644 --- a/arch/arm/cpu/arm920t/ep93xx/u-boot.lds +++ b/arch/arm/cpu/arm920t/ep93xx/u-boot.lds @@ -50,5 +50,8 @@ SECTIONS .bss : { *(.bss*) } __bss_end = .; - _end = .; + .end : + { + *(.__end) + } } diff --git a/arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds b/arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds index 40bcc31..e695058 100644 --- a/arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds +++ b/arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds @@ -49,7 +49,10 @@ SECTIONS __bss_end = .; } - _end = .; + .end : + { + *(.__end) + } /DISCARD/ : { *(.dynstr*) } /DISCARD/ : { *(.dynsym*) } diff --git a/arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds b/arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds index 4927736..b7c9a9d 100644 --- a/arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds +++ b/arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds @@ -49,7 +49,10 @@ SECTIONS __bss_end = .; } - _end = .; + .end : + { + *(.__end) + } /DISCARD/ : { *(.dynstr*) } /DISCARD/ : { *(.dynsym*) } diff --git a/arch/arm/cpu/armv7/am33xx/u-boot-spl.lds b/arch/arm/cpu/armv7/am33xx/u-boot-spl.lds index 9302856..33ef23b 100644 --- a/arch/arm/cpu/armv7/am33xx/u-boot-spl.lds +++ b/arch/arm/cpu/armv7/am33xx/u-boot-spl.lds @@ -38,7 +38,11 @@ SECTIONS . = ALIGN(4); __image_copy_end = .; - _end = .; + + .end : + { + *(.__end) + } .bss : { diff --git a/arch/arm/cpu/armv7/omap-common/u-boot-spl.lds b/arch/arm/cpu/armv7/omap-common/u-boot-spl.lds index 5e93b34..9e8cd82 100644 --- a/arch/arm/cpu/armv7/omap-common/u-boot-spl.lds +++ b/arch/arm/cpu/armv7/omap-common/u-boot-spl.lds @@ -34,7 +34,11 @@ SECTIONS . = ALIGN(4); __image_copy_end = .; - _end = .; + + .end : + { + *(.__end) + } .bss : { diff --git a/arch/arm/cpu/armv7/socfpga/u-boot-spl.lds b/arch/arm/cpu/armv7/socfpga/u-boot-spl.lds index a7c9c9d..4282beb 100644 --- a/arch/arm/cpu/armv7/socfpga/u-boot-spl.lds +++ b/arch/arm/cpu/armv7/socfpga/u-boot-spl.lds @@ -28,7 +28,11 @@ SECTIONS . = ALIGN(4); __image_copy_end = .; - _end = .; + + .end : + { + *(.__end) + } .bss : { . = ALIGN(4); diff --git a/arch/arm/cpu/ixp/u-boot.lds b/arch/arm/cpu/ixp/u-boot.lds index c8d2e12..0d2c81a 100644 --- a/arch/arm/cpu/ixp/u-boot.lds +++ b/arch/arm/cpu/ixp/u-boot.lds @@ -58,7 +58,10 @@ SECTIONS *(.__rel_dyn_end) } - _end = .; + .end : + { + *(.__end) + } /* * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c diff --git a/arch/arm/cpu/u-boot-spl.lds b/arch/arm/cpu/u-boot-spl.lds index 36cc54a..c25dc07 100644 --- a/arch/arm/cpu/u-boot-spl.lds +++ b/arch/arm/cpu/u-boot-spl.lds @@ -42,7 +42,10 @@ SECTIONS __rel_dyn_end = .; } - _end = .; + .end : + { + *(.__end) + } .bss __rel_dyn_start (OVERLAY) : { __bss_start = .; diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds index 23bf030..bc25067 100644 --- a/arch/arm/cpu/u-boot.lds +++ b/arch/arm/cpu/u-boot.lds @@ -60,7 +60,10 @@ SECTIONS *(.__rel_dyn_end) } - _end = .; + .end : + { + *(.__end) + } /* * Deprecated: this MMU section is used by pxa at present but diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 4e78723..a23485f 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -27,7 +27,6 @@ SOBJS-y += relocate.o ifndef CONFIG_SYS_GENERIC_BOARD COBJS-y += board.o endif -COBJS-y += sections.o COBJS-$(CONFIG_OF_LIBFDT) += bootm-fdt.o COBJS-$(CONFIG_CMD_BOOTM) += bootm.o @@ -38,6 +37,7 @@ else COBJS-$(CONFIG_SPL_FRAMEWORK) += spl.o endif +COBJS-y += sections.o COBJS-y += interrupts.o COBJS-y += reset.o diff --git a/arch/arm/lib/sections.c b/arch/arm/lib/sections.c index e35687c..5b30bcb 100644 --- a/arch/arm/lib/sections.c +++ b/arch/arm/lib/sections.c @@ -25,3 +25,4 @@ char __image_copy_start[0] __attribute__((section(".__image_copy_start"))); char __image_copy_end[0] __attribute__((section(".__image_copy_end"))); char __rel_dyn_start[0] __attribute__((section(".__rel_dyn_start"))); char __rel_dyn_end[0] __attribute__((section(".__rel_dyn_end"))); +char _end[0] __attribute__((section(".__end"))); diff --git a/board/actux1/u-boot.lds b/board/actux1/u-boot.lds index a656fa9..8054c69 100644 --- a/board/actux1/u-boot.lds +++ b/board/actux1/u-boot.lds @@ -66,7 +66,10 @@ SECTIONS *(.__rel_dyn_end) } - _end = .; + .end : + { + *(.__end) + } /* * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c diff --git a/board/actux2/u-boot.lds b/board/actux2/u-boot.lds index 7a17176..02fab26 100644 --- a/board/actux2/u-boot.lds +++ b/board/actux2/u-boot.lds @@ -66,7 +66,10 @@ SECTIONS *(.__rel_dyn_end) } - _end = .; + .end : + { + *(.__end) + } /* * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c diff --git a/board/actux3/u-boot.lds b/board/actux3/u-boot.lds index aadfdd2..c0e4797 100644 --- a/board/actux3/u-boot.lds +++ b/board/actux3/u-boot.lds @@ -66,7 +66,10 @@ SECTIONS *(.__rel_dyn_end) } - _end = .; + .end : + { + *(.__end) + } /* * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c diff --git a/board/ait/cam_enc_4xx/u-boot-spl.lds b/board/ait/cam_enc_4xx/u-boot-spl.lds index fdfbfc3..c0d09ad 100644 --- a/board/ait/cam_enc_4xx/u-boot-spl.lds +++ b/board/ait/cam_enc_4xx/u-boot-spl.lds @@ -48,5 +48,9 @@ SECTIONS } >.sram __image_copy_end = .; - _end = .; + + .end : + { + *(.__end) + } } diff --git a/board/davinci/da8xxevm/u-boot-spl-da850evm.lds b/board/davinci/da8xxevm/u-boot-spl-da850evm.lds index 5480d1f..de21a13 100644 --- a/board/davinci/da8xxevm/u-boot-spl-da850evm.lds +++ b/board/davinci/da8xxevm/u-boot-spl-da850evm.lds @@ -49,5 +49,9 @@ SECTIONS } >.sram __image_copy_end = .; - _end = .; + + .end : + { + *(.__end) + } } diff --git a/board/davinci/da8xxevm/u-boot-spl-hawk.lds b/board/davinci/da8xxevm/u-boot-spl-hawk.lds index e43130a..5401899 100644 --- a/board/davinci/da8xxevm/u-boot-spl-hawk.lds +++ b/board/davinci/da8xxevm/u-boot-spl-hawk.lds @@ -61,5 +61,8 @@ SECTIONS __bss_end = .; } - _end = .; + .end : + { + *(.__end) + } } diff --git a/board/dvlhost/u-boot.lds b/board/dvlhost/u-boot.lds index 40c9c80..18a1340 100644 --- a/board/dvlhost/u-boot.lds +++ b/board/dvlhost/u-boot.lds @@ -66,7 +66,10 @@ SECTIONS *(.__rel_dyn_end) } - _end = .; + .end : + { + *(.__end) + } /* * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c diff --git a/board/freescale/mx31ads/u-boot.lds b/board/freescale/mx31ads/u-boot.lds index 3acc4ca..09f6c43 100644 --- a/board/freescale/mx31ads/u-boot.lds +++ b/board/freescale/mx31ads/u-boot.lds @@ -69,7 +69,10 @@ SECTIONS *(.__rel_dyn_end) } - _end = .; + .end : + { + *(.__end) + } /* * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c diff --git a/board/samsung/common/exynos-uboot-spl.lds b/board/samsung/common/exynos-uboot-spl.lds index 8e3b73e..360b595 100644 --- a/board/samsung/common/exynos-uboot-spl.lds +++ b/board/samsung/common/exynos-uboot-spl.lds @@ -42,7 +42,11 @@ SECTIONS . = ALIGN(4); __image_copy_end = .; - _end = .; + + .end : + { + *(.__end) + } .bss : { diff --git a/board/ti/am335x/u-boot.lds b/board/ti/am335x/u-boot.lds index a173f62..366bdfa 100644 --- a/board/ti/am335x/u-boot.lds +++ b/board/ti/am335x/u-boot.lds @@ -77,7 +77,10 @@ SECTIONS *(.__rel_dyn_end) } - _end = .; + .end : + { + *(.__end) + } /* * Deprecated: this MMU section is used by pxa at present but diff --git a/board/vpac270/u-boot-spl.lds b/board/vpac270/u-boot-spl.lds index 7eac497..a6d842f 100644 --- a/board/vpac270/u-boot-spl.lds +++ b/board/vpac270/u-boot-spl.lds @@ -53,7 +53,10 @@ SECTIONS . = ALIGN(0x800); - _end = .; + .end : + { + *(.__end) + } .bss __rel_dyn_start (OVERLAY) : { __bss_start = .; -- 1.8.3.2 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot