diff -urN 2.3.99-pre2/arch/alpha/vmlinux.lds bss/arch/alpha/vmlinux.lds --- 2.3.99-pre2/arch/alpha/vmlinux.lds Sun Feb 27 06:19:41 2000 +++ bss/arch/alpha/vmlinux.lds Thu Apr 6 01:16:27 2000 @@ -50,9 +50,11 @@ .got : { *(.got) } .sdata : { *(.sdata) } _edata = .; - _bss = .; + + __bss_start = .; .sbss : { *(.sbss) *(.scommon) } .bss : { *(.bss) *(COMMON) } + __bss_stop = .; _end = .; .mdebug 0 : { *(.mdebug) } diff -urN 2.3.99-pre2/arch/i386/kernel/head.S bss/arch/i386/kernel/head.S --- 2.3.99-pre2/arch/i386/kernel/head.S Mon Mar 27 22:44:26 2000 +++ bss/arch/i386/kernel/head.S Thu Apr 6 01:16:27 2000 @@ -101,22 +101,12 @@ #ifdef __SMP__ orw %bx,%bx - jz 1f /* Initial CPU cleans BSS */ + jz 1f /* Initial CPU setup the system */ pushl $0 popfl jmp checkCPUtype 1: #endif __SMP__ -/* - * Clear BSS first so that there are no surprises... - */ - xorl %eax,%eax - movl $ SYMBOL_NAME(__bss_start),%edi - movl $ SYMBOL_NAME(_end),%ecx - subl %edi,%ecx - cld - rep - stosb /* * start system 32-bit setup. We need to re-do some of the things done * in 16-bit mode for the "real" operations. diff -urN 2.3.99-pre2/arch/ppc/vmlinux.lds bss/arch/ppc/vmlinux.lds --- 2.3.99-pre2/arch/ppc/vmlinux.lds Tue Oct 12 02:40:34 1999 +++ bss/arch/ppc/vmlinux.lds Thu Apr 6 01:16:30 2000 @@ -132,6 +132,7 @@ *(.bss) *(COMMON) } + __bss_stop = .; _end = . ; PROVIDE (end = .); } diff -urN 2.3.99-pre2/arch/sparc/vmlinux.lds bss/arch/sparc/vmlinux.lds --- 2.3.99-pre2/arch/sparc/vmlinux.lds Fri Feb 11 00:05:33 2000 +++ bss/arch/sparc/vmlinux.lds Thu Apr 6 01:16:30 2000 @@ -57,6 +57,7 @@ *(.bss) *(COMMON) } + __bss_stop = .; _end = . ; PROVIDE (end = .); /* Stabs debugging sections. */ diff -urN 2.3.99-pre2/arch/sparc64/vmlinux.lds bss/arch/sparc64/vmlinux.lds --- 2.3.99-pre2/arch/sparc64/vmlinux.lds Fri Feb 11 00:05:33 2000 +++ bss/arch/sparc64/vmlinux.lds Thu Apr 6 01:16:30 2000 @@ -58,6 +58,7 @@ *(.bss) *(COMMON) } + __bss_stop = .; _end = . ; PROVIDE (end = .); /* Stabs debugging sections. */ diff -urN 2.3.99-pre2/init/main.c bss/init/main.c --- 2.3.99-pre2/init/main.c Sat Mar 11 20:02:33 2000 +++ bss/init/main.c Thu Apr 6 01:17:53 2000 @@ -466,6 +466,13 @@ #endif +static void __init clear_bss(void) +{ + extern char * __bss_start, __bss_stop; + memset(__bss_start, 0, + (unsigned long) __bss_stop - (unsigned long) __bss_start); +} + /* * Activate the first processor. */ @@ -478,6 +485,7 @@ * Interrupts are still disabled. Do necessary setups, then * enable them */ + clear_bss(); lock_kernel(); printk(linux_banner); setup_arch(&command_line);