From ea40bc90e19141f8026a95235ba160ffe625e468 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Thu, 13 Jan 2011 23:00:22 +0000 Subject: [PATCH] The (%esp & 0xf) == 0 should be true before the call instruction is executed, for the properly aligned stack. Reported and tested by: rstone Pointy hat to: kib MFC after: 3 days --- lib/csu/i386-elf/crt1_s.S | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/csu/i386-elf/crt1_s.S b/lib/csu/i386-elf/crt1_s.S index d7ed0a2bec5..17ac0e39234 100644 --- a/lib/csu/i386-elf/crt1_s.S +++ b/lib/csu/i386-elf/crt1_s.S @@ -42,6 +42,7 @@ _start: .cfi_def_cfa_register %ebp andl $0xfffffff0,%esp # align stack leal 8(%ebp),%eax + subl $4,%esp pushl %eax # argv pushl 4(%ebp) # argc pushl %edx # rtld cleanup