Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jan 2011 23:00:22 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r217383 - head/lib/csu/i386-elf
Message-ID:  <201101132300.p0DN0MAo066578@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Thu Jan 13 23:00:22 2011
New Revision: 217383
URL: http://svn.freebsd.org/changeset/base/217383

Log:
  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

Modified:
  head/lib/csu/i386-elf/crt1_s.S

Modified: head/lib/csu/i386-elf/crt1_s.S
==============================================================================
--- head/lib/csu/i386-elf/crt1_s.S	Thu Jan 13 22:52:57 2011	(r217382)
+++ head/lib/csu/i386-elf/crt1_s.S	Thu Jan 13 23:00:22 2011	(r217383)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101132300.p0DN0MAo066578>