From patchwork Mon Mar 28 08:40: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: 88577 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 8FE1FB6F84 for ; Mon, 28 Mar 2011 19:40:47 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5F78E28265; Mon, 28 Mar 2011 10:40:45 +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 KN3ArBfLTTwo; Mon, 28 Mar 2011 10:40:45 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A4C4D2826B; Mon, 28 Mar 2011 10:40:43 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F1C3F2826B for ; Mon, 28 Mar 2011 10:40:39 +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 n8-1rhI4NgAQ for ; Mon, 28 Mar 2011 10:40: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 0BFA928265 for ; Mon, 28 Mar 2011 10:40:37 +0200 (CEST) Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 00DAB1C08DE2; Mon, 28 Mar 2011 10:40:35 +0200 (CEST) X-Auth-Info: jBnTACNSk9Q3RjZrrpixT4fE9ugt8mh7fUMRbN1XJG4= 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 77E621C0012F; Mon, 28 Mar 2011 10:40:35 +0200 (CEST) Received: from gemini.denx.de (gemini.denx.de [10.0.0.2]) by diddl.denx.de (Postfix) with ESMTP id 4FFFE329A66F; Mon, 28 Mar 2011 10:40:35 +0200 (CEST) Received: by gemini.denx.de (Postfix, from userid 500) id 02842D1BDBF; Mon, 28 Mar 2011 10:40:33 +0200 (CEST) From: Wolfgang Denk To: u-boot@lists.denx.de Date: Mon, 28 Mar 2011 10:40:31 +0200 Message-Id: <1301301631-6115-1-git-send-email-wd@denx.de> X-Mailer: git-send-email 1.7.4 In-Reply-To: References: Cc: Po-Yu Chuang Subject: [U-Boot] [PATCH RFC] 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__' As a workaround (instead of introducing linker scripts) we can add a --defsym=__bss_end__=_end Signed-off-by: Wolfgang Denk Cc: Po-Yu Chuang Cc: Albert Aribaud --- What I really do not understand is why we don't see the same type of undefined reference errors on ARM? ALso, on ARM we see __bss_end__ and _bss_end__, and __bss_start und __bss_start__ - where are the other names coming from? [On PPC we see only __bss_start and __bss_end__]. examples/standalone/Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile index c1dfdce..06cf14f 100644 --- a/examples/standalone/Makefile +++ b/examples/standalone/Makefile @@ -96,6 +96,7 @@ $(LIB): $(obj).depend $(LIBOBJS) $(ELF): $(obj)%: $(obj)%.o $(LIB) $(LD) -g -Ttext $(STANDALONE_LOAD_ADDR) \ + --defsym=__bss_end__=_end \ -o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \ -L$(gcclibdir) -lgcc