bigwad
aux = bigwad->elfargs;
bigwad->exenv.ex_brkbase = (caddr_t)0;
bigwad->exenv.ex_bssbase = (caddr_t)0;
bigwad->exenv.ex_brksize = 0;
bigwad->exenv.ex_brkbase = brkbase;
bigwad->exenv.ex_bssbase = bssbase;
bigwad->exenv.ex_brksize = brksize;
bigwad->exenv.ex_magic = elfmagic;
bigwad->exenv.ex_vp = vp;
setexecenv(&bigwad->exenv);
kmem_free(bigwad, sizeof (struct bigwad));
void *bigwad, *zeropg = NULL;
bigwad = kmem_alloc(bigsize, KM_SLEEP);
ehdr = (Ehdr *)bigwad;
phdr = (Phdr *)bigwad;
kmem_free(bigwad, bigsize);
Shdr *shdr = (Shdr *)bigwad;
kmem_free(bigwad, bigsize);
} *bigwad; /* kmem_alloc this behemoth so we don't blow stack */
bigwad = kmem_alloc(sizeof (struct bigwad), KM_SLEEP);
ehdrp = &bigwad->ehdr;
dlnp = bigwad->dl_name;
pathbufp = bigwad->pathbuf;
aux = bigwad->elfargs;
if (error && dlnp != bigwad->dl_name) {
bigwad->exenv.ex_brkbase = (caddr_t)PAGESIZE;
bigwad->exenv.ex_bssbase = (caddr_t)PAGESIZE;
bigwad->exenv.ex_bssbase = bssbase;
bigwad->exenv.ex_brkbase = brkbase;
bigwad->exenv.ex_brksize = brksize;
bigwad->exenv.ex_magic = elfmagic;
bigwad->exenv.ex_vp = vp;
setexecenv(&bigwad->exenv);
if ((error = execpermissions(nvp, &bigwad->vattr, args)) != 0) {
(char *)bigwad->elfargs));
(char *)bigwad->elfargs));
postfixsize = (uintptr_t)aux - (uintptr_t)bigwad->elfargs;
error = execpoststack(args, bigwad->elfargs, postfixsize);
} *bigwad;
size_t bigsize = MAX(psize, MAX(sizeof (*bigwad),
bigwad = kmem_alloc(bigsize, KM_SLEEP);
prgetpsinfo(p, &bigwad->psinfo);
bigwad->psinfo.pr_wstat = wstat(CLD_DUMPED, sig);
error = elfnote(vp, &offset, NT_PSINFO, sizeof (bigwad->psinfo),
(caddr_t)&bigwad->psinfo, rlimit, credp);
prgetstatus(p, &bigwad->pstatus, p->p_zone);
bigwad->pstatus.pr_lwp.pr_why = 0;
error = elfnote(vp, &offset, NT_PSTATUS, sizeof (bigwad->pstatus),
(caddr_t)&bigwad->pstatus, rlimit, credp);
bigwad->auxv[i].a_type = up->u_auxv[i].a_type;
bigwad->auxv[i].a_un.a_val = up->u_auxv[i].a_un.a_val;
error = elfnote(vp, &offset, NT_AUXV, sizeof (bigwad->auxv),
(caddr_t)bigwad->auxv, rlimit, credp);
bcopy(&utsname, &bigwad->uts, sizeof (struct utsname));
bcopy(p->p_zone->zone_nodename, &bigwad->uts.nodename,
(caddr_t)&bigwad->uts, rlimit, credp);
prgetsecflags(p, &bigwad->psecflags);
(caddr_t)&bigwad->psecflags, rlimit, credp);
bzero(bigwad, crsize);
prgetcred(p, &bigwad->pcred);
if (bigwad->pcred.pr_ngroups != 0) {
sizeof (gid_t) * (bigwad->pcred.pr_ngroups - 1);
(caddr_t)&bigwad->pcred, rlimit, credp);
prgetpriv(p, &bigwad->ppriv);
(caddr_t)&bigwad->ppriv, rlimit, credp);
fill_prcwd(p, &bigwad->cwd, vroot, credp);
error = elfnote(vp, &offset, NT_CWD, sizeof (bigwad->cwd),
(caddr_t)&bigwad->cwd, rlimit, credp);
prgetlwpsinfo(t, &bigwad->lwpsinfo);
bzero(&bigwad->lwpsinfo, sizeof (bigwad->lwpsinfo));
bigwad->lwpsinfo.pr_lwpid = lep->le_lwpid;
bigwad->lwpsinfo.pr_state = SZOMB;
bigwad->lwpsinfo.pr_sname = 'Z';
bigwad->lwpsinfo.pr_start.tv_sec = lep->le_start;
name.pr_lwpid = bigwad->lwpsinfo.pr_lwpid;
sizeof (bigwad->lwpsinfo), (caddr_t)&bigwad->lwpsinfo,
prgetlwpstatus(t, &bigwad->lwpstatus, p->p_zone);
bigwad->lwpstatus.pr_why = 0;
prgetlwpstatus(t, &bigwad->lwpstatus, p->p_zone);
sizeof (bigwad->lwpstatus), (caddr_t)&bigwad->lwpstatus,
prgetwindows(lwp, &bigwad->gwindows);
size, (caddr_t)&bigwad->gwindows,
prgetasregs(lwp, bigwad->asrset);
sizeof (asrset_t), (caddr_t)bigwad->asrset,
prgetprxregs(lwp, (prxregset_t *)bigwad->xregs);
xregsize, bigwad->xregs, rlimit, credp);
psinfo_kto32(psaddr, &bigwad->psinfo);
psaddr = &bigwad->psinfo;
bzero(&bigwad->upanic, sizeof (prupanic_t));
bigwad->upanic.pru_version = PRUPANIC_VERSION_1;
bigwad->upanic.pru_flags |= PRUPANIC_FLAG_MSG_ERROR;
bigwad->upanic.pru_flags |= PRUPANIC_FLAG_MSG_TRUNC;
bigwad->upanic.pru_flags |= PRUPANIC_FLAG_MSG_VALID;
bcopy(p->p_upanic, bigwad->upanic.pru_data,
&bigwad->upanic, rlimit, credp);
kmem_free(bigwad, bigsize);
bigwad = kmem_alloc(bigsize, KM_SLEEP);
oprgetpsinfo(p, &bigwad->psinfo, NULL);
error = elfnote(vp, &offset, NT_PRPSINFO, sizeof (bigwad->psinfo),
(caddr_t)&bigwad->psinfo, rlimit, credp);
bigwad->auxv[i].a_type = up->u_auxv[i].a_type;
bigwad->auxv[i].a_un.a_val = up->u_auxv[i].a_un.a_val;
error = elfnote(vp, &offset, NT_AUXV, sizeof (bigwad->auxv),
(caddr_t)bigwad->auxv, rlimit, credp);
oprgetstatus(t, &bigwad->prstat, p->p_zone);
bigwad->prstat.pr_why = 0;
oprgetstatus(t, &bigwad->prstat, p->p_zone);
sizeof (bigwad->prstat), (caddr_t)&bigwad->prstat,
prgetprfpregs(lwp, &bigwad->fpregs);
sizeof (bigwad->fpregs), (caddr_t)&bigwad->fpregs,
kmem_free(bigwad, bigsize);
} *bigwad;
size_t bigsize = sizeof (*bigwad);