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

# [NAME](#NAME)

gelf\_update\_versym, gelf\_update\_verdef, gelf\_update\_verdaux, gelf\_update\_verneed, gelf\_update\_vernaux - modify class-independent symbol versioning records

# [SYNOPSIS](#SYNOPSIS)

```
#include <gelf.h>
int gelf_update_versym (Elf_Data *data, int ndx, GElf_Versym  *src);
int gelf_update_verdef (Elf_Data *data, int offset, GElf_Verdef  *src);
int gelf_update_verdaux(Elf_Data *data, int offset, GElf_Verdaux *src);
int gelf_update_verneed(Elf_Data *data, int offset, GElf_Verneed *src);
int gelf_update_vernaux(Elf_Data *data, int offset, GElf_Vernaux *src);
```

# [DESCRIPTION](#DESCRIPTION)

These functions provide class-independent modification of GNU ELF symbol versioning sections. Each function copies the contents of the caller-supplied *src* into the symbol versioning entry at the specified index or offset within *data*.

[**gelf\_update\_versym**()](#gelf_update_versym)

Write a symbol version index into the **SHT\_GNU\_versym** section associated with *data* at index *ndx*.

[**gelf\_update\_verdef**()](#gelf_update_verdef)

Write a version definition entry into the **SHT\_GNU\_verdef** section associated with *data* at section offset *offset*.

[**gelf\_update\_verdaux**()](#gelf_update_verdaux)

Write a version definition auxiliary entry into the **SHT\_GNU\_verdef** section associated with *data* at section offset *offset*.

[**gelf\_update\_verneed**()](#gelf_update_verneed)

Write a version needed entry into the **SHT\_GNU\_verneed** section associated with *data* at section offset *offset*.

[**gelf\_update\_vernaux**()](#gelf_update_vernaux)

Write a version needed auxiliary entry into the **SHT\_GNU\_verneed** section associated with *data* at section offset *offset*.

# [PARAMETERS](#PARAMETERS)

[*data*](#data)

**Elf\_Data** pointer corresponding to the appropriate GNU symbol versioning section.

[*ndx*](#ndx)

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

[*offset*](#offset)

(For **gelf\_update\_verdef**(), **gelf\_update\_verdaux**(), **gelf\_update\_verneed**(), and **gelf\_update\_vernaux**().) Section-relative byte offset of the entry within *data*.

[*src*](#src)

Pointer to the caller-supplied symbol: **GElf\_Versym**, **GElf\_Verdef**, **GElf\_Verdaux**, **GElf\_Verneed**, or **GElf\_Vernaux** as appropriate. This argument must not be NULL.

# [RETURN VALUE](#RETURN_VALUE)

On success, these functions store the requested entry in *src*, mark the section corresponding to *data* with **ELF\_F\_DIRTY** and return a non-zero value. On failure, 0 is returned and elf\_errno is set. If *data* is NULL, 0 is returned without setting elf\_errno.

# [SEE ALSO](#SEE_ALSO)

[**gelf\_getverdaux**(3)](/man/os/elfutils/gelf_getverdaux.3), [**gelf\_getverdef**(3)](/man/os/elfutils/gelf_getverdef.3), [**gelf\_getvernaux**(3)](/man/os/elfutils/gelf_getvernaux.3), [**gelf\_getverneed**(3)](/man/os/elfutils/gelf_getverneed.3), [**gelf\_getversym**(3)](/man/os/elfutils/gelf_getversym.3), [**libelf**(3)](/man/os/elfutils/libelf.3), [**elf**(5)](/man/os/elfutils/elf.5)

# [ATTRIBUTES](#ATTRIBUTES)

**Interface** **Attribute** **Value** gelf\_update\_versym (), gelf\_update\_verdef (), gelf\_update\_verdaux (), gelf\_update\_verneed (), gelf\_update\_vernaux () 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_update_versym(3) from elfutils 0.196-r0 (Chainguard OS)
Source: https://sourceware.org/git/elfutils.git
