GELF\_UPDATE\_AUXV(3) Libelf Programmer's Manual GELF\_UPDATE\_AUXV(3)

# [NAME](#NAME)

gelf\_update\_auxv - Update information in the auxiliary vector at the given index

# [SYNOPSIS](#SYNOPSIS)

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

# [DESCRIPTION](#DESCRIPTION)

Copy a class-independent auxiliary vector entry from *src* into the **NT\_AUXV** note associated with *data* at index *ndx*. See [**getauxval**(3)](/man/os/elfutils/getauxval.3) for more information regarding the auxiliary vector.

# [PARAMETERS](#PARAMETERS)

[*data*](#data)

Pointer to an **Elf\_Data** associated with an **NT\_AUXV** ELF note. *data-&gt;d\_type* should be **ELF\_T\_AUXV**. **NT\_AUXV** notes are normally found in core files. The auxiliary vector can also be read directly from /proc/PID/auxv of a live process, in which case this function does not write back to *data* itself.

[*ndx*](#ndx)

Zero-based index of the auxiliary vector entry to be updated within *data*.

[*src*](#src)

Pointer to a caller-provided auxiliary vector entry. For **ELFCLASS32** binaries, **a\_type** and **a\_val** must fit within unsigned 32-bit values. *src* must not be NULL.

# [RETURN VALUE](#RETURN_VALUE)

On success, this function returns a non-zero value, updates the auxiliary vector entry at index *ndx* in *data*, and marks the section or segment associated with *data* with **ELF\_F\_DIRTY**. On failure, zero is returned and elf\_errno is set. If *data* is NULL, then zero is returned without setting elf\_errno.

# [SEE ALSO](#SEE_ALSO)

[**gelf\_getauxv**(3)](/man/os/elfutils/gelf_getauxv.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\_update\_auxv () Thread safety MT-Safe

# [REPORTING BUGS](#REPORTING_BUGS)

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

# [HISTORY](#HISTORY)

2025-12-31 Libelf

---

Document: gelf_update_auxv(3) from elfutils 0.196-r1 (Chainguard OS)
Source: https://sourceware.org/git/elfutils.git
