AUXV(5) BSD Programmer's Manual AUXV(5)NAMEauxv - ELF auxiliary vector
SYNOPSIS
#include <sys/elf.h>
DESCRIPTION
When the system runs an ELF program (see elf(5)), it puts some extra in-
formation on the stack. This information is called the auxiliary vector.
The elements of the auxiliary vector have type auxv_t:
typedef struct {
int a_type;
union {
long a_val;
void *a_ptr;
void (*a_fcn)();
} a_un;
} auxv_t;
Each element in the vector has an a_type field from the list below. If a
value is associated with the type, then the appropriate union member is
initialized to that value. The final element in the vector must have
type AT_NULL.
The following element types are defined:
AT_BASE The base address of the interpreter (typically, the dynam-
ic loader).
AT_ENTRY The entry point of the program; the address where the sys-
tem or the interpreter should start executing instructions
out of the program.
AT_EUID The effective UID of the program. (Linux extension.)
AT_EGID The effective GID of the program. (Linux extension.)
AT_EXECFD A file descriptor, open to the program's executable file.
(Not currently used.)
AT_FLAGS Architecture-specific flags.
AT_GID The real GID of the program. (Linux extension.)
AT_IGNORE A placeholder; its value is ignored.
AT_NULL The terminating element; its value is ignored.
AT_PAGESZ The page size in bytes.
AT_PHDR The address of the program header table. This element al-
lows an interpreter to locate the segments of a program
that the system has loaded. See elf(5) for a description
of the ELF program header table.
AT_PHENT The size in bytes of a program header.
AT_PHNUM The number of entries in the program header table.
AT_PSSTRINGS The address of the ps_strings structure (see
ps_strings(5)). The ps_strings structure provides the lo-
cations and sizes of the argument and environment vectors.
(BSD/OS extension.)
AT_UID The real UID of the program. (Linux extension.)
The auxiliary vector immediately follows the environment vector on the
stack.
SEE ALSOexecve(2), elf(5)BSDI BSD/OS December 21, 1997 2