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

# [NAME](#NAME)

gelf\_update\_dyn - Update class-independent information in the dynamic table at the given index

# [SYNOPSIS](#SYNOPSIS)

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

# [DESCRIPTION](#DESCRIPTION)

Copy a class-independent dynamic table entry from *src* into the **SHT\_DYNAMIC** section associated with *data* at index *ndx*.

# [PARAMETERS](#PARAMETERS)

[*data*](#data)

Pointer to an **Elf\_Data** associated with a section with type **SHT\_DYNAMIC**. *data-&gt;d\_type* should be **ELF\_T\_DYN**.

[*ndx*](#ndx)

Zero-based index of the dynamic table entry to be updated within *data*.

[*src*](#src)

Pointer to a caller-provided dynamic table entry. For **ELFCLASS32** binaries, **d\_tag** should be able to fit within a signed 32-bit value while **d\_val** and **d\_ptr** should be able to fit within unsigned 32-bit values. *src* must not be NULL.

# [RETURN VALUE](#RETURN_VALUE)

On success, this function returns a non-zero value and updates the dynamic table entry at index *ndx* in *data*. The dynamic table associated with *data* is flagged with **ELF\_F\_DIRTY**. On failure, zero is returned and elf\_errno is set. If *data* is NULL, then zero is returned and elf\_errno is not set.

# [SEE ALSO](#SEE_ALSO)

[**gelf\_getdyn**(3)](/man/os/elfutils/gelf_getdyn.3), [**libelf**(3)](/man/os/elfutils/libelf.3), [**elf**(5)](/man/os/elfutils/elf.5)

# [ATTRIBUTES](#ATTRIBUTES)

**Interface** **Attribute** **Value** gelf\_update\_dyn () Thread safety MT-Safe

# [REPORTING BUGS](#REPORTING_BUGS)

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

2025-12-30 Libelf

---

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