gelf_update_dyn - Man Page

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), libelf(3), elf(5)

Attributes

InterfaceAttributeValue
gelf_update_dyn()Thread safetyMT-Safe

Reporting Bugs

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

Referenced By

gelf_getdyn(3).

2025-12-30 Libelf Programmer's Manual