---
name: "gelf_getmove"
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_getmove"
---

# gelf\_getmove(3)

read and update Elf Move information

## NAME

**gelf\_getmove**, **gelf\_update\_move** – read and update Elf Move information

## LIBRARY

library “libelf”

## SYNOPSIS

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

*GElf\_Move \**\

**gelf\_getmove**(*Elf\_Data \*data*, *int ndx*, *GElf\_Move \*move*);

*int*\

**gelf\_update\_move**(*Elf\_Data \*data*, *int ndx*, *GElf\_Move \*move*);

## DESCRIPTION

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

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

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

Function **gelf\_update\_move**() converts the class-independent move information pointed to by argument *move* to class-dependent form, and writes it to the move record at index *ndx* in the data buffer described by argument *data*. Function **gelf\_update\_move**() signals an error if any of the values in the class-independent representation exceeds the representable limits of the target type.

## RETURN VALUES

Function **gelf\_getmove**() returns the value of argument *move* if successful, or NULL in case of an error. Function **gelf\_update\_move**() 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 *move* were NULL.

- \[ELF\_E\_ARGUMENT\]

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

- \[ELF\_E\_ARGUMENT\]

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

- \[ELF\_E\_RANGE\]

  A value was not representable in the target type.

- \[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)
