1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

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. * SUCH DAMAGE.
* *
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 * 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" #include "apm.h"
@ -860,6 +860,13 @@ setregs(p, entry, stack)
/* Initialize the npx (if any) for the current process. */ /* Initialize the npx (if any) for the current process. */
npxinit(__INITIAL_NPXCW__); npxinit(__INITIAL_NPXCW__);
#endif #endif
/*
* XXX - Linux emulator
* Make sure sure edx is 0x0 on entry. Linux binaries depend
* on it.
*/
p->p_retval[1] = 0;
} }
static int static int

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 * 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" #include "apm.h"
@ -860,6 +860,13 @@ setregs(p, entry, stack)
/* Initialize the npx (if any) for the current process. */ /* Initialize the npx (if any) for the current process. */
npxinit(__INITIAL_NPXCW__); npxinit(__INITIAL_NPXCW__);
#endif #endif
/*
* XXX - Linux emulator
* Make sure sure edx is 0x0 on entry. Linux binaries depend
* on it.
*/
p->p_retval[1] = 0;
} }
static int static int