Zero p->retval[1] when starting a process. This value ends up in %edx

when the process starts, and having it nonzero causes statically-linked
Linux binaries to fail.

PR:		i386/10015
Submitted by:	Marcel Moolenaar <marcel@scc.nl>
This commit is contained in:
Mike Smith 1999-02-11 07:53:28 +00:00
parent 957fea92f0
commit e4a5d947a3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=43887
2 changed files with 16 additions and 2 deletions

View file

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.323 1999/01/28 11:45:29 newton Exp $
* $Id: machdep.c,v 1.324 1999/02/03 14:10:50 dg Exp $
*/
#include "apm.h"
@ -860,6 +860,13 @@ setregs(p, entry, stack)
/* Initialize the npx (if any) for the current process. */
npxinit(__INITIAL_NPXCW__);
#endif
/*
* XXX - Linux emulator
* Make sure sure edx is 0x0 on entry. Linux binaries depend
* on it.
*/
p->p_retval[1] = 0;
}
static int

View file

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.323 1999/01/28 11:45:29 newton Exp $
* $Id: machdep.c,v 1.324 1999/02/03 14:10:50 dg Exp $
*/
#include "apm.h"
@ -860,6 +860,13 @@ setregs(p, entry, stack)
/* Initialize the npx (if any) for the current process. */
npxinit(__INITIAL_NPXCW__);
#endif
/*
* XXX - Linux emulator
* Make sure sure edx is 0x0 on entry. Linux binaries depend
* on it.
*/
p->p_retval[1] = 0;
}
static int