---
name: "gelf_getauxv"
section: "3"
platform: "linux"
package: "libelf"
version: "0.197-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/gelf_getauxv"
---

# gelf\_getauxv(3)

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

## 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)](/elf_getdata_rawchunk/3.md) 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)](/getauxval/3.md) 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)](/elf_getdata_rawchunk/3.md) 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)](/elf_getdata_rawchunk/3.md), [**getauxval**(3)](/getauxval/3.md) [**libelf**(3)](/libelf/3.md), [**elf**(5)](/elf/5.md)

## ATTRIBUTES

| | | |
| --- | --- | --- |
| **Interface** | **Attribute** | **Value** |
| **gelf\_getauxv**() | 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.
