GELF\_GETAUXV(3) Libelf Programmer's Manual GELF\_GETAUXV(3)

# [NAME](#NAME)

gelf\_getauxv - Get class-independent information from auxiliary vector at the given index

# [SYNOPSIS](#SYNOPSIS)

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

# [DESCRIPTION](#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)](/man/os/elfutils/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)](/man/os/elfutils/getauxval.3) for more information regarding the auxiliary vector.

# [PARAMETERS](#PARAMETERS)

[*data*](#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)](/man/os/elfutils/elf_getdata_rawchunk.3) for more information.

[*ndx*](#ndx)

Index of the requested auxiliary vector entry within *data*.

[*dst*](#dst)

Pointer to a caller-provided **GElf\_auxv\_t** structure for storing the requested auxiliary vector entry. Must not be NULL.

# [RETURN VALUE](#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](#SEE_ALSO)

[**elf\_getdata\_rawchunk**(3)](/man/os/elfutils/elf_getdata_rawchunk.3), [**getauxval**(3)](/man/os/elfutils/getauxval.3) [**libelf**(3)](/man/os/elfutils/libelf.3), [**elf**(5)](/man/os/elfutils/elf.5)

# [ATTRIBUTES](#ATTRIBUTES)

**Interface** **Attribute** **Value** gelf\_getauxv () Thread safety MT-Safe

# [REPORTING BUGS](#REPORTING_BUGS)

Report bugs to &lt;elfutils-devel@sourceware.org&gt; or https://sourceware.org/bugzilla/.

# [HISTORY](#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.

2025-12-31 Libelf

---

Document: gelf_getauxv(3) from elfutils 0.197-r0 (Chainguard OS)
Source: https://sourceware.org/git/elfutils.git
