From patchwork Tue Mar 29 12:39:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfgang Denk X-Patchwork-Id: 88757 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 75589B6F0D for ; Tue, 29 Mar 2011 23:39:49 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 97DD2280A1; Tue, 29 Mar 2011 14:39:47 +0200 (CEST) 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 TEyX74Sfu-uO; Tue, 29 Mar 2011 14:39:47 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E3A9128098; Tue, 29 Mar 2011 14:39:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4672428098 for ; Tue, 29 Mar 2011 14:39:42 +0200 (CEST) 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 cnIdkxxTVq2g for ; Tue, 29 Mar 2011 14:39:39 +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 mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by theia.denx.de (Postfix) with ESMTP id BA05428090 for ; Tue, 29 Mar 2011 14:39:34 +0200 (CEST) Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id A01751C01F0A for ; Tue, 29 Mar 2011 14:39:34 +0200 (CEST) X-Auth-Info: 10MwprEWdT+hK+S0WsBWHOSVmE0fzM+ZPFrGLVfvFR0= Received: from diddl.denx.de (host-80-81-18-216.customer.m-online.net [80.81.18.216]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA id 977281C00108 for ; Tue, 29 Mar 2011 14:39:34 +0200 (CEST) Received: from gemini.denx.de (gemini.denx.de [10.0.0.2]) by diddl.denx.de (Postfix) with ESMTP id 7FB60329A66F for ; Tue, 29 Mar 2011 14:39:34 +0200 (CEST) Received: by gemini.denx.de (Postfix, from userid 500) id 72889EDFFCE; Tue, 29 Mar 2011 14:39:34 +0200 (CEST) From: Wolfgang Denk To: u-boot@lists.denx.de Date: Tue, 29 Mar 2011 14:39:31 +0200 Message-Id: <1301402371-8697-1-git-send-email-wd@denx.de> X-Mailer: git-send-email 1.7.4 In-Reply-To: <4D90BA8B.3080200@free.fr> References: <4D90BA8B.3080200@free.fr> Subject: [U-Boot] [PATCH RFC v2] Fix build problems caused by "_end" -> "__bss_end__" rename X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 Commit 44c6e65 "rename _end to __bss_end__ broke building of a large number of systems (at least all PowerPC?): libstubs.o: In function `app_startup': examples/standalone/stubs.c:197: undefined reference to `__bss_end__' The rename should not be done for the files in the examples/standalone/ directory, as these are not using the code from start.S, but do their own BSS clearing, and either use their own linker scripts or the ones provided by the compilers. Signed-off-by: Wolfgang Denk --- V2: Instead of messing with linker defines, revert the patch in question for the files in examples/standalone/ as suggested by Albert Aribaud. (Thanks!) examples/standalone/mips.lds | 2 +- examples/standalone/sparc.lds | 2 +- examples/standalone/stubs.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/standalone/mips.lds b/examples/standalone/mips.lds index 68ae217..63a1c92 100644 --- a/examples/standalone/mips.lds +++ b/examples/standalone/mips.lds @@ -55,5 +55,5 @@ SECTIONS .sbss (NOLOAD) : { *(.sbss) } .bss (NOLOAD) : { *(.bss) . = ALIGN(4); } - __bss_end__ = .; + _end = .; } diff --git a/examples/standalone/sparc.lds b/examples/standalone/sparc.lds index 7f060b6..9733daa 100644 --- a/examples/standalone/sparc.lds +++ b/examples/standalone/sparc.lds @@ -57,5 +57,5 @@ SECTIONS } . = ALIGN(4); __bss_end = .; - __bss_end__ = .; + _end = .; } diff --git a/examples/standalone/stubs.c b/examples/standalone/stubs.c index 1379df7..2d2e709 100644 --- a/examples/standalone/stubs.c +++ b/examples/standalone/stubs.c @@ -187,14 +187,14 @@ void __attribute__((unused)) dummy(void) #include <_exports.h> } -extern unsigned long __bss_start, __bss_end__; +extern unsigned long __bss_start, _end; void app_startup(char * const *argv) { unsigned char * cp = (unsigned char *) &__bss_start; /* Zero out BSS */ - while (cp < (unsigned char *)&__bss_end__) { + while (cp < (unsigned char *)&_end) { *cp++ = 0; }