From patchwork Fri Sep 4 03:15:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Chou X-Patchwork-Id: 514318 X-Patchwork-Delegate: thomas@wytron.com.tw 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 2721314028F for ; Fri, 4 Sep 2015 13:16:19 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0D8034B7C4; Fri, 4 Sep 2015 05:16:08 +0200 (CEST) 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 PEMjyyjlfCPa; Fri, 4 Sep 2015 05:16:07 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 42C8F4B7C7; Fri, 4 Sep 2015 05:15:58 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A609D4B755 for ; Fri, 4 Sep 2015 05:15:44 +0200 (CEST) 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 LA1klcY4-dqX for ; Fri, 4 Sep 2015 05:15:44 +0200 (CEST) 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 www.wytron.com.tw (220-134-43-68.HINET-IP.hinet.net [220.134.43.68]) by theia.denx.de (Postfix) with ESMTP id 2DEAC4B752 for ; Fri, 4 Sep 2015 05:15:40 +0200 (CEST) Received: from localhost.localdomain (unknown [192.168.1.250]) by www.wytron.com.tw (Postfix) with ESMTP id 564D4D00365; Fri, 4 Sep 2015 11:15:38 +0800 (CST) From: Thomas Chou To: u-boot@lists.denx.de Date: Fri, 4 Sep 2015 11:15:24 +0800 Message-Id: <1441336526-23505-4-git-send-email-thomas@wytron.com.tw> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1441336526-23505-1-git-send-email-thomas@wytron.com.tw> References: <1441336526-23505-1-git-send-email-thomas@wytron.com.tw> Subject: [U-Boot] [PATCH 3/5] nios2: revert _end symbol in link script X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Since commit 44c6e6591cb451ae606f8bde71dd5fb7b4002544 "rename _end to __bss_end__" , the _end was removed. But we need it now for separated device tree control, ie, CONFIG_OF_SEPARATE . Though _end used to be the end of u-boot.bin image, we mark it up and relocate the dtb part of u-boot-dtb.bin here to be used by fdtdec_setup(). Signed-off-by: Thomas Chou Reviewed-by: Simon Glass --- arch/nios2/cpu/u-boot.lds | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/arch/nios2/cpu/u-boot.lds b/arch/nios2/cpu/u-boot.lds index 6e174be..2d43602 100644 --- a/arch/nios2/cpu/u-boot.lds +++ b/arch/nios2/cpu/u-boot.lds @@ -50,9 +50,10 @@ SECTIONS *(.gnu.linkonce.d*) } - . = ALIGN(16); - _gp = .; /* Global pointer addr */ - PROVIDE (gp = .); + /* gp - Since we don't use gp for small data with option "-G0", + * we will use gp as global data pointer. The _gp location is + * not needed. + */ .sdata : { @@ -62,6 +63,9 @@ SECTIONS } . = ALIGN(4); + /* _edata - This is end of u-boot.bin image. + * dtb will be appended here to make u-boot-dtb.bin + */ _edata = .; PROVIDE (edata = .); @@ -88,6 +92,12 @@ SECTIONS } . = ALIGN(4); __bss_end = .; + + /* _end - Though _end used to be the end of u-boot.bin image, + * we mark it up and relocate the dtb part of u-boot-dtb.bin here + * to be used by fdtdec_setup(). + */ + _end = .; PROVIDE (end = .); /* DEBUG -- symbol table, string table, etc. etc.