[PATCH 17/21] doc: Add gelf_update_lib.3
Mark Wielaard
mark@klomp.org
Tue Mar 3 17:41:48 GMT 2026
Hi Aaron,
Basically the same comments as for gelf_getlib. I believe this is about
a data structure shared between the MIPS linker and prelink, but
elfutils only supports the prelink case through SHT_GNU_LIBLIST.
On Wed, 2025-12-31 at 21:50 -0500, Aaron Merey wrote:
> Signed-off-by: Aaron Merey <amerey@redhat.com>
> ---
> doc/Makefile.am | 1 +
> doc/gelf_update_lib.3 | 78 +++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 79 insertions(+)
> create mode 100644 doc/gelf_update_lib.3
>
> diff --git a/doc/Makefile.am b/doc/Makefile.am
> index 9917d399..fc29c2ff 100644
> --- a/doc/Makefile.am
> +++ b/doc/Makefile.am
> @@ -115,6 +115,7 @@ notrans_dist_man3_MANS= elf32_checksum.3 \
> gelf_offscn.3 \
> gelf_update_ehdr.3 \
> gelf_update_dyn.3 \
> + gelf_update_lib.3 \
> gelf_update_move.3 \
> gelf_update_phdr.3 \
> gelf_update_shdr.3 \
OK.
> diff --git a/doc/gelf_update_lib.3 b/doc/gelf_update_lib.3
> new file mode 100644
> index 00000000..06f10391
> --- /dev/null
> +++ b/doc/gelf_update_lib.3
> @@ -0,0 +1,78 @@
> +.TH GELF_UPDATE_lib 3 2025-12-31 "Libelf" "Libelf Programmer's Manual"
> +
> +.SH NAME
> +gelf_update_lib \- Update library in table at the given index
Maybe insert prelink?
> +.SH SYNOPSIS
> +.nf
> +.B #include <gelf.h>
> +
> +.BI "int gelf_update_lib (Elf_Data *" data ", int " ndx ", GElf_Lib *" src ");"
OK.
> +.SH DESCRIPTION
> +Copy a class\-independent library table entry from
prelink?
> +.I src
> +into the
> +.B SHT_MIPS_LIBLIST
> +section associated with
> +.I data
> +at index
> +.IR ndx .
SHT_GNU_LIBLIST with d_type ELF_T_LIB?
> +.SH PARAMETERS
> +.TP
> +.I data
> +Pointer to an
> +.B Elf_Data
> +associated with a section with type
> +.BR SHT_MIPS_LIBLIST .
Likewise?
> +.TP
> +.I ndx
> +Zero\-based index of the library table entry to be updated within
> +.IR data .
> +
> +.TP
> +.I src
> +Pointer to a caller\-provided library table entry.
> +.I src
> +must not be NULL.
OK.
> +.SH RETURN VALUE
> +On success, this function returns a non-zero value and updates
> +the library table 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 and elf_errno is not set.
OK.
> +.SH SEE ALSO
> +.BR gelf_getlib (3),
> +.BR libelf (3),
> +.BR elf (5)
Where are Elf32_Lib, Elf64_Lib or GElf_Lib described?
> +.SH ATTRIBUTES
> +.TS
> +allbox;
> +lbx lb lb
> +l l l.
> +Interface Attribute Value
> +T{
> +.na
> +.nh
> +.BR gelf_update_lib ()
> +T} Thread safety MT-Safe
> +.TE
> +
> +.SH REPORTING BUGS
> +Report bugs to <elfutils-devel@sourceware.org> or https://sourceware.org/bugzilla/.
> +
> +.SH HISTORY
> +.B gelf_update_lib
> +first appeared in elfutils 0.95.
elfutils extension?
Thanks,
Mark
More information about the Elfutils-devel
mailing list