summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/boot/main_entry.c7
-rw-r--r--arch/x86/lib/barebox.lds.S2
2 files changed, 3 insertions, 6 deletions
diff --git a/arch/x86/boot/main_entry.c b/arch/x86/boot/main_entry.c
index 5f199e985b..d1d8f34bc4 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 2917d2fa12..e0919a68ea 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
}