gelf_getauxv3
Get class-independent information from auxiliary vector at the given index
Usage
#include <gelf.h> GElf_auxv_t *gelf_getauxv (Elf_Data *data, int ndx, GElf_auxv_t *dst);
Overview
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_Dataof a note with typeNT_AUXVand must have itsd_typeset toELF_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_tstructure 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.
Attributes
| Interface | Attribute | Value |
| gelf_getauxv() | Thread safety | MT-Safe |