Hi Aaron,
On Wed, 2025-12-31 at 21:50 -0500, Aaron Merey wrote:
> Signed-off-by: Aaron Merey <[email protected]>
> ---
> doc/Makefile.am | 1 +
> doc/gelf_update_sym.3 | 82 +++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 83 insertions(+)
> create mode 100644 doc/gelf_update_sym.3
>
> diff --git a/doc/Makefile.am b/doc/Makefile.am
> index 25567984..928c38a8 100644
> --- a/doc/Makefile.am
> +++ b/doc/Makefile.am
> @@ -113,6 +113,7 @@ notrans_dist_man3_MANS= elf32_checksum.3 \
> gelf_update_shdr.3 \
> gelf_update_rel.3 \
> gelf_update_rela.3 \
> + gelf_update_sym.3 \
> gelf_update_versym.3 \
> gelf_update_verdef.3 \
> gelf_update_verdaux.3 \
OK.
> diff --git a/doc/gelf_update_sym.3 b/doc/gelf_update_sym.3
> new file mode 100644
> index 00000000..a2c731ca
> --- /dev/null
> +++ b/doc/gelf_update_sym.3
> @@ -0,0 +1,82 @@
> +.TH GELF_UPDATE_SYM 3 2025-09-07 "Libelf" "Libelf Programmer's Manual"
> +
> +.SH NAME
> +gelf_update_sym \- update a class\-independent symbol table entry
> +
> +.SH SYNOPSIS
> +.nf
> +.B #include <gelf.h>
> +
> +.BI "int gelf_update_sym (Elf_Data *" data ", int " ndx ", GElf_Sym *" src
> ");"
OK.
> +.SH DESCRIPTION
> +Copy a class\-independent symbol table entry from
> +.I src
> +into the
> +.B SHT_SYMTAB
> +or
> +.B SHT_DYNSYM
> +section associated with
> +.I data
> +at entry index
> +.IR ndx .
Same comment as with gelf_getsym, mention the size of the table and
reference gelf_update_symshndx?
> +.SH PARAMETERS
> +.TP
> +.I data
> +.B Elf_Data for a symbol table section with type
> +.B SHT_SYMTAB
> +or
> +.BR SHT_DYNSYM .
> +
> +.TP
> +.I ndx
> +Zero\-based index of the symbol table entry to be updated within
> +.IR data .
> +
> +.TP
> +.I src
> +Pointer to the caller\-provided symbol table entry. For
> +.B ELFCLASS32
> +binaries,
> +.B st_value
> +and
> +.B st_size
> +should be able to fit within unsigned 32-bit values.
> +.I src
> +must not be NULL.
OK.
> +.SH RETURN VALUE
> +On success, this function returns a non-zero value and updates
> +the symbol table entry at index
> +.I ndx
> +in
> +.IR data .
> +The symbol table section associated with
> +.I data
> +will be 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 and elf_errno is not set.
OK.
> +.SH SEE ALSO
> +.BR gelf_getsym (3),
> +.BR libelf (3),
> +.BR elf (5)
gelf_update_symshdnx?
> +.SH ATTRIBUTES
> +.TS
> +allbox;
> +lbx lb lb
> +l l l.
> +Interface Attribute Value
> +T{
> +.na
> +.nh
> +.BR gelf_update_sym ()
> +T} Thread safety MT-Safe
> +.TE
> +
> +.SH REPORTING BUGS
> +Report bugs to <[email protected]> or
> https://sourceware.org/bugzilla/.
OK.
Thanks,
Mark