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:
msmith 1999-02-11 07:53:28 +00:00
parent 7a86eec332
commit 472282d6e7
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