mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 7/9] x86: use sections.h header file for linker variables
Date: Mon, 17 Jan 2011 11:16:59 +0100	[thread overview]
Message-ID: <1295259421-26338-8-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1295259421-26338-1-git-send-email-s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/x86/boot/main_entry.c |    7 ++-----
 arch/x86/lib/barebox.lds.S |    2 +-
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/x86/boot/main_entry.c b/arch/x86/boot/main_entry.c
index 5f199e9..d1d8f34 100644
--- a/arch/x86/boot/main_entry.c
+++ b/arch/x86/boot/main_entry.c
@@ -24,10 +24,7 @@
  */
 
 #include <string.h>
-
-/* These symbols are generated by the linker */
-extern char __bss_start;
-extern char __bss_end;
+#include <asm/sections.h>
 
 extern void start_barebox(void);
 
@@ -39,6 +36,6 @@ extern void start_barebox(void);
 void uboot_entry(void)
 {
 	/* clear the BSS first */
-	memset(&__bss_start, 0x00, &__bss_end - &__bss_start);
+	memset(__bss_start, 0x00, __bss_stop - __bss_start);
 	start_barebox();
 }
diff --git a/arch/x86/lib/barebox.lds.S b/arch/x86/lib/barebox.lds.S
index 2917d2f..e0919a6 100644
--- a/arch/x86/lib/barebox.lds.S
+++ b/arch/x86/lib/barebox.lds.S
@@ -188,7 +188,7 @@ SECTIONS
 		__bss_start = .;
 		*(.bss*);
 		*( COMMON )
-		__bss_end = .;
+		__bss_stop = .;
 		_end = .;
 	} > barebox
 }
-- 
1.7.2.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2011-01-17 10:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-17 10:16 cleanup " Sascha Hauer
2011-01-17 10:16 ` [PATCH 1/9] ppc pcm030: provide _stext, _text and __bss_stop in linker script Sascha Hauer
2011-01-17 10:16 ` [PATCH 2/9] blackfin: provide " Sascha Hauer
2011-01-17 10:16 ` [PATCH 3/9] ARM: " Sascha Hauer
2011-01-17 10:16 ` [PATCH 4/9] add sections.h header file Sascha Hauer
2011-01-17 10:16 ` [PATCH 5/9] ARM start.c: use sections.h header file for linker variables Sascha Hauer
2011-01-17 10:16 ` [PATCH 6/9] ARM: remove unnecessary include Sascha Hauer
2011-01-17 10:16 ` Sascha Hauer [this message]
2011-01-17 10:17 ` [PATCH 8/9] reloc.h: remove linker variables which are now in asm/sections.h Sascha Hauer
2011-01-17 10:17 ` [PATCH 9/9] startup: make debug printing of linker variables work again Sascha Hauer

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=1295259421-26338-8-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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