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

# gelf\_update\_dyn(3)

Update class-independent information in the dynamic table at the given index

## NAME

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

## SYNOPSIS

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

## DESCRIPTION

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

## PARAMETERS

- *data*

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

- *ndx*

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

- *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

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

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

## ATTRIBUTES

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

## REPORTING BUGS

Report bugs to \<elfutils-devel@sourceware.org\> or https://sourceware.org/bugzilla/.
