[PATCH 7/9] x86: use sections.h header file for linker variables
Sascha Hauer
s.hauer at pengutronix.de
Mon Jan 17 05:16:59 EST 2011
Signed-off-by: Sascha Hauer <s.hauer at 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
More information about the barebox
mailing list