public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: daniel.schwierzeck at gmail.com <daniel.schwierzeck@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 1/7] MIPS: u-boot.lds: merge all BSS sections and introduce symbols __bss_[start|end]
Date: Sat,  9 Feb 2013 21:33:24 +0100	[thread overview]
Message-ID: <1360442010-7520-2-git-send-email-daniel.schwierzeck@gmail.com> (raw)
In-Reply-To: <1360442010-7520-1-git-send-email-daniel.schwierzeck@gmail.com>

From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>

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 <daniel.schwierzeck@gmail.com>
---
 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);
-- 
1.8.1.1

  reply	other threads:[~2013-02-09 20:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-09 20:33 [U-Boot] [PATCH v1 0/7] MIPS: add dynamic relocation support daniel.schwierzeck at gmail.com
2013-02-09 20:33 ` daniel.schwierzeck at gmail.com [this message]
2013-02-09 20:33 ` [U-Boot] [PATCH v1 2/7] MIPS: u-boot.lds: introduce symbol __image_copy_end daniel.schwierzeck at gmail.com
2013-02-09 20:33 ` [U-Boot] [PATCH v1 3/7] MIPS: board.c: switch to new symbols __bss_end and __image_copy_end daniel.schwierzeck at gmail.com
2013-02-09 20:33 ` [U-Boot] [PATCH v1 4/7] MIPS: start.S: optimize BSS initialization daniel.schwierzeck at gmail.com
2013-02-09 20:33 ` [U-Boot] [PATCH v1 5/7] MIPS: start.S: use symbol __image_copy_end for U-Boot image relocation daniel.schwierzeck at gmail.com
2013-02-09 20:33 ` [U-Boot] [PATCH v1 6/7] MIPS: u-boot.lds: add relocation specific sections daniel.schwierzeck at gmail.com
2013-02-11 10:48   ` Gabor Juhos
2013-02-11 13:32     ` Daniel Schwierzeck
2013-02-11 14:14       ` Gabor Juhos
2013-02-11 14:29         ` Daniel Schwierzeck
2013-02-11 14:32   ` [U-Boot] [PATCH v2 " Daniel Schwierzeck
2013-02-11 14:56     ` Gabor Juhos
2013-02-09 20:33 ` [U-Boot] [PATCH v1 7/7] MIPS: add dynamic relocation support daniel.schwierzeck at gmail.com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1360442010-7520-2-git-send-email-daniel.schwierzeck@gmail.com \
    --to=daniel.schwierzeck@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox