---
name: "gelf_update_syminfo"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/gelf_getsyminfo"
---

# gelf\_update\_syminfo(3)

read and update symbol information

Part of [gelf\_getsyminfo(3)](/gelf_getsyminfo/3.md).

## NAME

**gelf\_getsyminfo**, **gelf\_update\_syminfo** – read and update symbol information

## LIBRARY

library “libelf”

## SYNOPSIS

**#include \<gelf.h\>**

*GElf\_Syminfo \**\

**gelf\_getsyminfo**(*Elf\_Data \*data*, *int ndx*, *GElf\_Syminfo \*syminfo*);

*int*\

**gelf\_update\_syminfo**(*Elf\_Data \*data*, *int ndx*, *GElf\_Syminfo \*syminfo*);

## DESCRIPTION

These convenience functions are used to retrieve and update class-dependent *Elf32\_Syminfo* and *Elf64\_Syminfo* records in an ELF object.

Argument *data* is an *Elf\_Data* descriptor associated with a section of type SHT\_SUNW\_syminfo. Argument *ndx* is the index of the record being retrieved or updated. The class-independent *GElf\_Syminfo* structure is described in [gelf(3)](/gelf/3.md).

Function **gelf\_getsyminfo**() retrieves class-dependent record at index *ndx* in data buffer *data* and copies it to the destination pointed to by argument *syminfo* after translation to class-independent form.

Function **gelf\_update\_syminfo**() converts the class-independent record pointed to by argument *syminfo* to class-dependent form, and writes it to the record at index *ndx* in the data buffer described by argument *data*.

## RETURN VALUES

Function **gelf\_getsyminfo**() returns the value of argument *syminfo* if successful, or NULL in case of an error. Function **gelf\_update\_syminfo**() returns a non-zero value if successful, or zero in case of an error.

## ERRORS

These functions may fail with the following errors:

- \[ELF\_E\_ARGUMENT\]

  Arguments *data* or *syminfo* were NULL.

- \[ELF\_E\_ARGUMENT\]

  Argument *ndx* was less than zero or larger than the number of symbols in the data descriptor.

- \[ELF\_E\_ARGUMENT\]

  Data descriptor *data* was not associated with a section containing symbol information.

- \[ELF\_E\_VERSION\]

  The *Elf\_Data* descriptor denoted by argument *data* is associated with an ELF object with an unsupported version.

## SEE ALSO

[elf(3)](/elf/3.md), [elf\_getdata(3)](/elf_getdata/3.md), [elf\_getscn(3)](/elf_getscn/3.md), [gelf(3)](/gelf/3.md), [gelf\_getsym(3)](/gelf_getsym/3.md), [gelf\_update\_sym(3)](/gelf_update_sym/3.md)
