summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1999-02-11 07:53:28 +0000
committermsmith <msmith@FreeBSD.org>1999-02-11 07:53:28 +0000
commit4ef23fab94c614e2e42029a09de004d3a1613d62 (patch)
tree826e06b0e742b75c0bc8602c769383ce9517f390 /sys
parent0b7d53e958b478611f943b5d56de1094971aa62a (diff)
downloadFreeBSD-src-4ef23fab94c614e2e42029a09de004d3a1613d62.zip
FreeBSD-src-4ef23fab94c614e2e42029a09de004d3a1613d62.tar.gz
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>
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/machdep.c9
-rw-r--r--sys/i386/i386/machdep.c9
2 files changed, 16 insertions, 2 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 0a6b14a..b785ebf 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -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
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index 0a6b14a..b785ebf 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -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
OpenPOWER on IntegriCloud