summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--payloads/libpayload/arch/i386/head.S9
1 files changed, 8 insertions, 1 deletions
diff --git a/payloads/libpayload/arch/i386/head.S b/payloads/libpayload/arch/i386/head.S
index db18a5195f..88db4124d5 100644
--- a/payloads/libpayload/arch/i386/head.S
+++ b/payloads/libpayload/arch/i386/head.S
@@ -70,10 +70,17 @@ _init:
movl %esp, %esi
/* Store EAX and EBX */
-
movl %eax,loader_eax
movl %ebx,loader_ebx
+ /* Clear the bss */
+ cld
+ movl $.bss, %edi
+ movl $_end, %ecx
+ subl %edi, %ecx
+ xor %ax, %ax
+ rep stosb
+
/* Setup new stack. */
movl $_stack, %ebx