The ELF ABI declares that argc must fill an `argument slot'. Make it so.
For __sparc_v9__ only, do a hack to make old executables continue to work -- for now.
This commit is contained in:
parent
94581370f5
commit
93a8d5ffea
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_exec.c,v 1.115 2000/07/13 02:33:36 matt Exp $ */
|
||||
/* $NetBSD: kern_exec.c,v 1.116 2000/07/26 15:42:09 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1993, 1994, 1996 Christopher G. Demetriou
|
||||
|
@ -593,9 +593,13 @@ copyargs(pack, arginfo, stack, argp)
|
|||
char *dp, *sp;
|
||||
size_t len;
|
||||
void *nullp = NULL;
|
||||
int argc = arginfo->ps_nargvstr;
|
||||
int envc = arginfo->ps_nenvstr;
|
||||
long argc = arginfo->ps_nargvstr;
|
||||
long envc = arginfo->ps_nenvstr;
|
||||
|
||||
#ifdef __sparc_v9__
|
||||
/* XXX Temporary hack for argc format conversion. */
|
||||
argc = (argc << 32) | (argc & 0xffffffff);
|
||||
#endif
|
||||
if (copyout(&argc, cpp++, sizeof(argc)))
|
||||
return NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue