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

# [NAME](#NAME)

gelf\_getversym, gelf\_getverdef, gelf\_getverdaux, gelf\_getverneed, gelf\_getvernaux - retrieve GNU symbol versioning entries

# [SYNOPSIS](#SYNOPSIS)

```
#include <gelf.h>
GElf_Versym  *gelf_getversym (Elf_Data *data, int ndx, GElf_Versym  *dst);
GElf_Verdef  *gelf_getverdef (Elf_Data *data, int offset, GElf_Verdef  *dst);
GElf_Verdaux *gelf_getverdaux(Elf_Data *data, int offset, GElf_Verdaux *dst);
GElf_Verneed *gelf_getverneed(Elf_Data *data, int offset, GElf_Verneed *dst);
GElf_Vernaux *gelf_getvernaux(Elf_Data *data, int offset, GElf_Vernaux *dst);
```

# [DESCRIPTION](#DESCRIPTION)

These functions provide class-independent access to GNU ELF symbol version information. The requested entry is retrieved from *data* and stored in the caller-supplied *dst*.

[**gelf\_getversym**()](#gelf_getversym)

Retrieves the symbol version index at index *ndx* from the **SHT\_GNU\_versym** section associated with *data*.

[**gelf\_getverdef**()](#gelf_getverdef)

Retrieves the version definition entry at section offset *offset* from the **SHT\_GNU\_verdef** section associated with *data*.

[**gelf\_getverdaux**()](#gelf_getverdaux)

Retrieves the version definition auxiliary entry at section offset *offset* from the **SHT\_GNU\_verdef** section associated with *data*.

[**gelf\_getverneed**()](#gelf_getverneed)

Retrieves the version needed entry at section offset *offset* from the **SHT\_GNU\_verneed** section associated with *data*.

[**gelf\_getvernaux**()](#gelf_getvernaux)

Retrieves the version needed auxiliary entry at section offset *offset* from the **SHT\_GNU\_verneed** section associated with *data*.

# [PARAMETERS](#PARAMETERS)

[*data*](#data)

Pointer to an **Elf\_Data** corresponding to the appropriate GNU versioning section.

[*ndx*](#ndx)

(For **gelf\_getversym**() only.) Zero-based index of the entry within *data*.

[*offset*](#offset)

(For **gelf\_getverdef**(), **gelf\_getverdaux**(), **gelf\_getverneed**(), and **gelf\_getvernaux**().) Section-relative byte offset of the entry within *data*.

[*dst*](#dst)

Pointer to a caller-provided entry of the appropriate type: **GElf\_Versym**, **GElf\_Verdef**, **GElf\_Verdaux**, **GElf\_Verneed**, or **GElf\_Vernaux**. This argument must not be NULL.

# [RETURN VALUE](#RETURN_VALUE)

On success, these functions store the requested entry in *dst* and return *dst*. On failure, these functions return NULL and set elf\_errno. If *data* is NULL, then NULL is returned without setting elf\_errno.

# [SEE ALSO](#SEE_ALSO)

[**gelf\_update\_verdaux**(3)](/man/os/elfutils/gelf_update_verdaux.3), [**gelf\_update\_verdef**(3)](/man/os/elfutils/gelf_update_verdef.3), [**gelf\_update\_vernaux**(3)](/man/os/elfutils/gelf_update_vernaux.3), [**gelf\_update\_verneed**(3)](/man/os/elfutils/gelf_update_verneed.3), [**gelf\_update\_versym**(3)](/man/os/elfutils/gelf_update_versym.3), [**libelf**(3)](/man/os/elfutils/libelf.3), [**elf**(5)](/man/os/elfutils/elf.5)

# [ATTRIBUTES](#ATTRIBUTES)

**Interface** **Attribute** **Value** gelf\_getversym (), gelf\_getverdef (), gelf\_getverdaux(), gelf\_getverneed (), gelf\_getvernaux () Thread safety MT-Safe

# [REPORTING BUGS](#REPORTING_BUGS)

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

2025-09-27 Libelf

---

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