From patchwork Thu Nov 7 14:15:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Albert ARIBAUD X-Patchwork-Id: 289356 X-Patchwork-Delegate: albert.aribaud@free.fr Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 43EFB2C0077 for ; Fri, 8 Nov 2013 01:15:44 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BE35D4A38E; Thu, 7 Nov 2013 15:15:42 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MRbdRCr9lcV4; Thu, 7 Nov 2013 15:15:42 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B39164A381; Thu, 7 Nov 2013 15:15:38 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DAC6D4A37F for ; Thu, 7 Nov 2013 15:15:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TTl5J07DXAPu for ; Thu, 7 Nov 2013 15:15:28 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp3-g21.free.fr (smtp3-g21.free.fr [212.27.42.3]) by theia.denx.de (Postfix) with ESMTP id AE83D4A34B for ; Thu, 7 Nov 2013 15:15:16 +0100 (CET) Received: from localhost.localdomain (unknown [IPv6:2a01:e35:2eb9:21:ae22:bff:fe1a:1040]) (Authenticated sender: aribaud.smtp) by smtp3-g21.free.fr (Postfix) with ESMTPSA id 26737A62AE; Thu, 7 Nov 2013 15:15:11 +0100 (CET) From: Albert ARIBAUD To: u-boot@lists.denx.de Date: Thu, 7 Nov 2013 15:15:03 +0100 Message-Id: <1383833704-25617-1-git-send-email-albert.u.boot@aribaud.net> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1381648228-24373-1-git-send-email-albert.u.boot@aribaud.net> References: <1381648228-24373-1-git-send-email-albert.u.boot@aribaud.net> Subject: [U-Boot] [PATCH v2 1/2] arm: make _end compiler-generated X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This prevents references to _end from generating absolute relocation records. Signed-off-by: Albert ARIBAUD Reviewed-by: Benoît Thébaudeau --- 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 = .;