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

# [NAME](#NAME)

gelf\_getdyn - Get class-independent information from dynamic table at the given index

# [SYNOPSIS](#SYNOPSIS)

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

# [DESCRIPTION](#DESCRIPTION)

Retrieve a dynamic table entry from *data* at index *ndx* and store it in a class-independent representation pointed to by *dst*.

*data* must be an **Elf\_Data\*** associated with a section of type **SHT\_DYNAMIC**

# [PARAMETERS](#PARAMETERS)

[*data*](#data)

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

[*ndx*](#ndx)

Zero-based index of the requested dynamic table entry within *data*.

[*dst*](#dst)

Pointer to a caller-provided **GElf\_Dyn** structure for storing the requested dynamic table entry. Must not be NULL.

# [RETURN VALUE](#RETURN_VALUE)

On success, this function updates *dst* with the requested dynamic table 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](#SEE_ALSO)

[**gelf\_update\_dyn**(3)](/man/os/elfutils/gelf_update_dyn.3), [**libelf**(3)](/man/os/elfutils/libelf.3), [**elf**(5)](/man/os/elfutils/elf.5)

# [ATTRIBUTES](#ATTRIBUTES)

**Interface** **Attribute** **Value** gelf\_getdyn () 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_getdyn(3) from elfutils 0.197-r0 (Chainguard OS)
Source: https://sourceware.org/git/elfutils.git
