]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
doc: Add gelf_update_move.3
authorAaron Merey <amerey@redhat.com>
Thu, 1 Jan 2026 02:50:39 +0000 (21:50 -0500)
committerAaron Merey <amerey@redhat.com>
Fri, 13 Mar 2026 18:46:51 +0000 (14:46 -0400)
Signed-off-by: Aaron Merey <amerey@redhat.com>
doc/Makefile.am
doc/gelf_update_move.3 [new file with mode: 0644]

index 5ef3eb3b9a0b5bf7d9f245ad86e085cabd73f80c..d648e669c554c0873231254b48f8e67d9bb7be64 100644 (file)
@@ -114,6 +114,7 @@ notrans_dist_man3_MANS= elf32_checksum.3 \
                        gelf_offscn.3 \
                        gelf_update_ehdr.3 \
                        gelf_update_dyn.3 \
+                       gelf_update_move.3 \
                        gelf_update_phdr.3 \
                        gelf_update_shdr.3 \
                        gelf_update_rel.3 \
diff --git a/doc/gelf_update_move.3 b/doc/gelf_update_move.3
new file mode 100644 (file)
index 0000000..7f6ee64
--- /dev/null
@@ -0,0 +1,101 @@
+.TH GELF_UPDATE_MOVE 3 2025-12-30 "Libelf" "Libelf Programmer's Manual"
+
+.SH NAME
+gelf_update_move \- Update class\-independent move structure at the given index
+
+.SH SYNOPSIS
+.nf
+.B #include <gelf.h>
+
+.BI "int gelf_update_move (Elf_Data *" data ", int " ndx ", GElf_Move *" src ");"
+
+.SH DESCRIPTION
+This function copies a class\-independent move structure from
+.I src
+into the
+.B SHT_SUNW_move
+section associated with
+.I data
+at entry index
+.IR ndx .
+
+.I data
+should be associated with an ELF section with type
+.B SHT_SUNW_move
+section.
+.I data->d_type
+should be
+.BR ELF_T_MOVE .
+These types are Sun/Solaris extensions and are not typically used in GNU/Linux
+ELF files.
+
+.SH PARAMETERS
+.TP
+.I data
+Pointer to an
+.B Elf_Data
+associated with a
+.B SHT_SUNW_move
+section.
+.I data->d_type
+should be
+.BR ELF_T_MOVE .
+
+.TP
+.I ndx
+Zero\-based index of the move structure entry to be updated within
+.IR data .
+
+.TP
+.I src
+Pointer to a caller\-provided move structure.  For
+.B ELFCLASS32
+binaries,
+.B m_info
+and
+.B m_poffset
+should be able to fit within unsigned 32-bit values.
+The
+.B GELF_M_SIZE
+component of
+.B m_info
+should fit in unsigned 8 bits and the
+.B GELF_M_SYM
+component should fit in unsigned 24 bits.
+.I src
+must not be NULL.
+
+.SH RETURN VALUE
+On success, this function returns a non-zero value and updates
+the move entry at index
+.I ndx
+in
+.IR data .
+The section associated with
+.I data
+is flagged with
+.BR ELF_F_DIRTY .
+On failure, zero is returned and elf_errno is set.  If
+.I data
+is NULL, then zero is returned without setting elf_errno.
+
+.SH SEE ALSO
+.BR gelf_getmove (3),
+.BR libelf (3),
+.BR elf (5)
+
+.SH ATTRIBUTES
+.TS
+allbox;
+lbx lb lb
+l l l.
+Interface      Attribute       Value
+T{
+.na
+.nh
+.BR gelf_update_move ()
+T}     Thread safety   MT-Safe
+.TE
+
+.SH REPORTING BUGS
+Report bugs to <elfutils-devel@sourceware.org> or https://sourceware.org/bugzilla/.