Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/kern_exec.c
Show First 20 Lines • Show All 1,631 Lines • ▼ Show 20 Lines | exec_copyout_strings(struct image_params *imgp) | ||||
destp -= ARG_MAX - imgp->args->stringspace; | destp -= ARG_MAX - imgp->args->stringspace; | ||||
destp = rounddown2(destp, sizeof(void *)); | destp = rounddown2(destp, sizeof(void *)); | ||||
vectp = (char **)destp; | vectp = (char **)destp; | ||||
if (imgp->sysent->sv_stackgap != NULL) | if (imgp->sysent->sv_stackgap != NULL) | ||||
imgp->sysent->sv_stackgap(imgp, (u_long *)&vectp); | imgp->sysent->sv_stackgap(imgp, (u_long *)&vectp); | ||||
if (imgp->auxargs) { | if (imgp->auxargs) | ||||
/* | imgp->sysent->sv_copyout_auxargs(imgp, (u_long *)&vectp); | ||||
* Allocate room on the stack for the ELF auxargs | |||||
* array. It has up to AT_COUNT entries. | |||||
*/ | |||||
vectp -= howmany(AT_COUNT * sizeof(Elf_Auxinfo), | |||||
sizeof(*vectp)); | |||||
} | |||||
/* | /* | ||||
* Allocate room for the argv[] and env vectors including the | * Allocate room for the argv[] and env vectors including the | ||||
* terminating NULL pointers. | * terminating NULL pointers. | ||||
*/ | */ | ||||
vectp -= imgp->args->argc + 1 + imgp->args->envc + 1; | vectp -= imgp->args->argc + 1 + imgp->args->envc + 1; | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 182 Lines • Show Last 20 Lines |