From patchwork Sat Feb 9 20:33:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Schwierzeck X-Patchwork-Id: 219437 X-Patchwork-Delegate: daniel.schwierzeck@googlemail.com 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 9B4C62C0087 for ; Sun, 10 Feb 2013 07:34:02 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2779E4A054; Sat, 9 Feb 2013 21:34:00 +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 7BraWMDvCWsY; Sat, 9 Feb 2013 21:33:59 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6FA084A057; Sat, 9 Feb 2013 21:33:44 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 769FF4A04A for ; Sat, 9 Feb 2013 21:33:39 +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 EqwGx69k7smT for ; Sat, 9 Feb 2013 21:33:38 +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 mail-bk0-f50.google.com (mail-bk0-f50.google.com [209.85.214.50]) by theia.denx.de (Postfix) with ESMTPS id 21EAA4A04C for ; Sat, 9 Feb 2013 21:33:36 +0100 (CET) Received: by mail-bk0-f50.google.com with SMTP id jg9so2111028bkc.9 for ; Sat, 09 Feb 2013 12:33:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=EV4JKjQmxiL8IAexpoIJuHhd2p1pPap7KlspCBjEk+s=; b=edUbEQFcKF4Yv1SNKxZJ89OsC59Lgq08pLIhmN4HSYE7ezNzJmc018BIrCsPPGHM3b OjiO28/he+CRhPTdlTc06I/x/08l/yDP/bccS50C5JwbFduH9kO3fM0eGR5YlQOgjeGd kYMNvxkNB6b6tu2tHi+cYQGYlMECnG6q+9ewNJZdABdmpdOnW10a8rE7mQxmwYhoogLV 4WQUrO2IPLKWkcdTp+1GmUl8cYo0xohLAn5w4J/HIX/ZOrzztaAvmFixrO8ZwMTJskpN htsas34w3zQfyT+Hamh+EMIVCwM6NqrK6WO5WWFblMuV/HWsL+sh5DglZbuussV6MouU GXUw== X-Received: by 10.204.131.89 with SMTP id w25mr2631510bks.22.1360442016116; Sat, 09 Feb 2013 12:33:36 -0800 (PST) Received: from workstation.sas.sys.sphairon.com (dslb-094-222-038-034.pools.arcor-ip.net. [94.222.38.34]) by mx.google.com with ESMTPS id fs20sm11492516bkc.8.2013.02.09.12.33.34 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 09 Feb 2013 12:33:35 -0800 (PST) From: daniel.schwierzeck@gmail.com To: u-boot@lists.denx.de Date: Sat, 9 Feb 2013 21:33:24 +0100 Message-Id: <1360442010-7520-2-git-send-email-daniel.schwierzeck@gmail.com> X-Mailer: git-send-email 1.8.1.1 In-Reply-To: <1360442010-7520-1-git-send-email-daniel.schwierzeck@gmail.com> References: <1360442010-7520-1-git-send-email-daniel.schwierzeck@gmail.com> Cc: Zhi-zhou Zhang Subject: [U-Boot] [PATCH v1 1/7] MIPS: u-boot.lds: merge all BSS sections and introduce symbols __bss_[start|end] 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 From: Daniel Schwierzeck These symbols are used in later patches for as addresses for clearing the BSS area in the relocated U-Boot image. Signed-off-by: Daniel Schwierzeck --- arch/mips/cpu/u-boot.lds | 11 ++++++----- arch/mips/include/asm/u-boot-mips.h | 12 ++++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/arch/mips/cpu/u-boot.lds b/arch/mips/cpu/u-boot.lds index 58a49b2..6980b86 100644 --- a/arch/mips/cpu/u-boot.lds +++ b/arch/mips/cpu/u-boot.lds @@ -70,13 +70,14 @@ SECTIONS uboot_end_data = .; . = ALIGN(4); - .sbss : { - *(.sbss*) - } - .bss : { - *(.bss*) + __bss_start = .; + *(.sbss.*) + *(.bss.*) + *(COMMON) . = ALIGN(4); + __bss_end = .; } + uboot_end = .; } diff --git a/arch/mips/include/asm/u-boot-mips.h b/arch/mips/include/asm/u-boot-mips.h index 6f26dfa..eda0498 100644 --- a/arch/mips/include/asm/u-boot-mips.h +++ b/arch/mips/include/asm/u-boot-mips.h @@ -8,4 +8,16 @@ extern ulong uboot_end_data; extern ulong uboot_end; +static inline unsigned long bss_start(void) +{ + extern ulong __bss_start; + return (unsigned long) &__bss_start; +} + +static inline unsigned long bss_end(void) +{ + extern ulong __bss_end; + return (unsigned long) &__bss_end; +} + extern int incaip_set_cpuclk(void);