diff --git a/sys/conf/ldscript.i386 b/sys/conf/ldscript.i386 index 21eab2a136ed..e5d0f0cf5f43 100644 --- a/sys/conf/ldscript.i386 +++ b/sys/conf/ldscript.i386 @@ -140,9 +140,9 @@ SECTIONS } .data1 : { *(.data1) } _edata = .; PROVIDE (edata = .); - __bss_start = .; .bss : { + __bss_start = .; *(.dynbss) *(.bss .bss.* .gnu.linkonce.b.*) *(COMMON) @@ -152,6 +152,7 @@ SECTIONS FIXME: Why do we need it? When there is no .bss section, we don't pad the .data section. */ . = ALIGN(. != 0 ? 32 / 8 : 1); + __bss_end = .; } . = ALIGN(32 / 8); . = ALIGN(32 / 8); diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s index e8b677ce3a8a..454f7f0a1010 100644 --- a/sys/i386/i386/locore.s +++ b/sys/i386/i386/locore.s @@ -120,8 +120,8 @@ NON_GPROF_ENTRY(btext) * inactive from now until we switch to new ones, since we don't load any * more segment registers or permit interrupts until after the switch. */ - movl $end,%ecx - movl $edata,%edi + movl $__bss_end,%ecx + movl $__bss_start,%edi subl %edi,%ecx xorl %eax,%eax cld