#include <sys/auxv.h> unsigned long getauxval(unsigned long type);
Each entry in the auxiliary vector consists of a pair of values: a type that identifies what this entry represents, and a value for that type. Given the argument type, getauxval() returns the corresponding value.
The value returned for each type is given in the following list. Not all type values are present on all architectures.
The auxiliary vector resides just above the argument list and environment in the process address space. The auxiliary vector supplied to a program can be viewed by setting the LD_SHOW_AUXV environment variable when running a program:
$ LD_SHOW_AUXV=1 sleep 1
The auxiliary vector of any process can (subject to file permissions) be obtained via /proc/PID/auxv; see proc(5) for more information.