gelf_update_auxv(3)

gelf_update_auxv3

Update information in the auxiliary vector at the given index

Usage

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

Overview

Copy a class-independent auxiliary vector entry from src into the NT_AUXV note associated with data at index ndx. See getauxval(3) for more information regarding the auxiliary vector.

Parameters

data

Pointer to an Elf_Data associated with an NT_AUXV ELF note. data->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

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

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

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.

Attributes

InterfaceAttributeValue
gelf_update_auxv()Thread safetyMT-Safe

Reporting bugs

Report bugs to <[email protected]> or https://sourceware.org/bugzilla/.

History

From libelf 0.197-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.