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 - -/* These symbols are generated by the linker */ -extern char __bss_start; -extern char __bss_end; +#include extern void start_barebox(void); @@ -39,6 +36,6 @@ 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 @@ __bss_start = .; *(.bss*); *( COMMON ) - __bss_end = .; + __bss_stop = .; _end = .; } > barebox }