GELF_GETAUXV(3)

NAME
gelf_getauxv - Get class-independent information from auxiliary vector at the given index

SYNOPSIS
#include <gelf.h>
GElf_auxv_t *gelf_getauxv (Elf_Data *data, int ndx, GElf_auxv_t *dst);

DESCRIPTION
Retrieve an auxiliary vector entry from data at index ndx and store it in the class-independent representation pointed to by dst.

data must be an Elf_Data* associated with an ELF note of type NT_AUXV and must have its d_type set to ELF_T_AUXV. elf_getdata_rawchunk(3) can be used to acquire an Elf_Data* with a d_type of ELF_T_AUXV. NT_AUXV notes are normally found in core files. The auxiliary vector can be also be read directly from /proc/PID/auxv. See getauxval(3) for more information regarding the auxiliary vector.

PARAMETERS

data
    Pointer to an Elf_Data of a note with type NT_AUXV and must have its d_type set to ELF_T_AUXV. See elf_getdata_rawchunk(3) for more information.

ndx Index of the requested auxiliary vector entry within data.

dst Pointer to a caller-provided GElf_auxv_t structure for storing the requested auxiliary vector entry. Must not be NULL.

RETURN VALUE
On success, this function updates dst with the requested auxiliary vector entry and returns dst. On failure, it returns NULL and sets elf_errno. If data is NULL, then NULL is returned without setting elf_errno.

SEE ALSO
elf_getdata_rawchunk(3), getauxval(3) libelf(3), elf(5)

ATTRIBUTES
Interface | Attribute | Value
 | Thread safety | MT-Safe

REPORTING BUGS
Report bugs to <elfutils-devel@sourceware.org> or https://sourceware.org/bugzilla/.

HISTORY
gelf_getauxv first appeared in elfutils 0.130. This function is an elfutils libelf extension and may not be available in other libelf implementations.