Signed-off-by: Aaron Merey <[email protected]>
---
 doc/Makefile.am        |  2 +
 doc/gelf_update_rel.3  | 91 ++++++++++++++++++++++++++++++++++++++++++
 doc/gelf_update_rela.3 |  1 +
 3 files changed, 94 insertions(+)
 create mode 100644 doc/gelf_update_rel.3
 create mode 100644 doc/gelf_update_rela.3

diff --git a/doc/Makefile.am b/doc/Makefile.am
index aee5f2f1..153c05ba 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -101,6 +101,8 @@ notrans_dist_man3_MANS= elf32_checksum.3 \
                        gelf_offscn.3 \
                        gelf_update_ehdr.3 \
                        gelf_update_shdr.3 \
+                       gelf_update_rel.3 \
+                       gelf_update_rela.3 \
                        libelf.3
 
 # libdebuginfod man pages (also notrans)
diff --git a/doc/gelf_update_rel.3 b/doc/gelf_update_rel.3
new file mode 100644
index 00000000..767b07ad
--- /dev/null
+++ b/doc/gelf_update_rel.3
@@ -0,0 +1,91 @@
+.TH GELF_UPDATE_REL 3 2025-09-27 "Libelf" "Libelf Programmer's Manual"
+
+.SH NAME
+gelf_update_rel, gelf_update_rela \- copy class\-independent relocation 
entries into a relocation section
+
+.SH SYNOPSIS
+.nf
+.B #include <gelf.h>
+
+.BI "int gelf_update_rel (Elf_Data *" data ", int " ndx ", GElf_Rel  *" src 
");"
+.BI "int gelf_update_rela(Elf_Data *" data ", int " ndx ", GElf_Rela *" src 
");"
+.fi
+
+.SH DESCRIPTION
+The
+.BR gelf_update_rel ()
+and
+.BR gelf_update_rela ()
+functions copy a class\-independent REL or RELA relocation entry from
+.IR *src
+into the SHT_REL or SHT_RELA section associated with
+.I data
+at entry index
+.IR ndx .
+
+.SH PARAMETERS
+.TP
+.I data
+.B Elf_Data
+for a relocation section.  The section must have sh_type
+.B SHT_REL
+for
+.BR gelf_update_rel ()
+or
+.B SHT_RELA
+for
+.BR gelf_update_rela ().
+
+.TP
+.I ndx
+Zero\-based index of the relocation entry within
+.IR data .
+
+.TP
+.I src
+Pointer to the caller\-provided source entry:
+.B GElf_Rel
+for
+.BR gelf_update_rel ()
+and
+.B GElf_Rela
+for
+.BR gelf_update_rela ().
+.I src
+must not be NULL.
+
+.SH RETURN VALUE
+On success,
+.BR gelf_update_rel ()
+and
+.BR gelf_update_rela ()
+copy
+.I src
+into
+.I data
+and return 1. On failure, these functions return 0 and set elf_errno.  If
+.I src
+is NULL, then 0 is returned without setting elf_errno.
+
+.SH SEE ALSO
+.BR gelf_getrel (3),
+.BR gelf_getrela (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_rel (),\~gelf_update_rela ()
+T}     Thread safety   MT-Safe
+.TE
+
+.SH REPORTING BUGS
+Report bugs to <[email protected]> or 
https://sourceware.org/bugzilla/.
diff --git a/doc/gelf_update_rela.3 b/doc/gelf_update_rela.3
new file mode 100644
index 00000000..36db4a78
--- /dev/null
+++ b/doc/gelf_update_rela.3
@@ -0,0 +1 @@
+.so man3/gelf_update_rel.3
-- 
2.51.0

Reply via email to