[PATCH 5/9] ARM start.c: use sections.h header file for linker variables

Sascha Hauer s.hauer at pengutronix.de
Mon Jan 17 05:16:57 EST 2011


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/arm/cpu/start.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
index b55df5d..e0fb712 100644
--- a/arch/arm/cpu/start.c
+++ b/arch/arm/cpu/start.c
@@ -25,6 +25,7 @@
 #include <asm/barebox-arm.h>
 #include <asm/system.h>
 #include <asm-generic/memory_layout.h>
+#include <asm/sections.h>
 
 void __naked __section(.text_entry) exception_vectors(void)
 {
@@ -40,8 +41,6 @@ void __naked __section(.text_entry) exception_vectors(void)
 	);
 }
 
-extern char __bss_start, _end;
-
 /*
  * The actual reset vector. This code is position independent and usually
  * does not run at the address it's linked at.
@@ -108,7 +107,7 @@ void __naked __bare_init board_init_lowlevel_return(void)
 				(unsigned int)&__bss_start - TEXT_BASE);
 
 	/* clear bss */
-	memset(&__bss_start, 0, &_end - &__bss_start);
+	memset(__bss_start, 0, __bss_stop - __bss_start);
 
 	/* call start_barebox with its absolute address */
 	r = (unsigned int)&start_barebox;
-- 
1.7.2.3




More information about the barebox mailing list