[PATCH 10/21] doc: Add gelf_getsyminfo.3

Mark Wielaard mark@klomp.org
Thu Feb 26 20:06:53 GMT 2026


Hi Aaron,

On Wed, Dec 31, 2025 at 09:50:34PM -0500, Aaron Merey wrote:
> Signed-off-by: Aaron Merey <amerey@redhat.com>
> ---
>  doc/Makefile.am       |  1 +
>  doc/gelf_getsyminfo.3 | 75 +++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 76 insertions(+)
>  create mode 100644 doc/gelf_getsyminfo.3
> 
> diff --git a/doc/Makefile.am b/doc/Makefile.am
> index 62c835a8..2b2720d5 100644
> --- a/doc/Makefile.am
> +++ b/doc/Makefile.am
> @@ -99,6 +99,7 @@ notrans_dist_man3_MANS= elf32_checksum.3 \
>  			gelf_getrel.3 \
>  			gelf_getrela.3 \
>  			gelf_getsym.3 \
> +			gelf_getsyminfo.3 \
>  			gelf_getsymshndx.3 \
>  			gelf_getversym.3 \
>  			gelf_getverdef.3 \

OK.

> diff --git a/doc/gelf_getsyminfo.3 b/doc/gelf_getsyminfo.3
> new file mode 100644
> index 00000000..2fa0d205
> --- /dev/null
> +++ b/doc/gelf_getsyminfo.3
> @@ -0,0 +1,75 @@
> +.TH GELF_GETSYMINFO 3 2025-12-30 "Libelf" "Libelf Programmer's Manual"
> +
> +.SH NAME
> +gelf_getsyminfo \- Retrieve class\-independent additional symbol information
> +from the symbol table at the given index

I have never seen this used. It looks like a Solaris extension.

> +.SH SYNOPSIS
> +.nf
> +.B #include <gelf.h>
> +
> +.BI "GElf_Syminfo *gelf_getsyminfo (Elf_Data *" data ", int " ndx ", GElf_Syminfo *" dst ");"

OK.

> +.SH DESCRIPTION
> +Copy the additional symbol information entry from
> +.I data
> +at index
> +.I ndx
> +into the class\-independent
> +.B GElf_Syminfo
> +structure pointed to by
> +.IR dst .
> +
> +.I data
> +should be associated with an ELF section with type
> +.BR SHT_SUNW_syminfo .

Or the data should be of type ELF_T_SYMINFO.

Probably should mention that this is a Sun/Solaris extension, not
normally used in GNU/Linux Elf files.

> +.SH PARAMETERS
> +.TP
> +.I data
> +Pointer to an
> +.B Elf_Data
> +for an
> +.B SHT_SUNW_syminfo
> +section.
> +
> +.TP
> +.I ndx
> +Zero\-based index of the additional symbol table information entry within
> +.IR data .
> +
> +.TP
> +.I dst
> +Pointer to a caller\-provided structure for storing the additional symbol
> +information entry.

Must not be NULL.

> +.SH RETURN VALUE
> +On success, this function copies the requested additional symbol information
> +entry into
> +.I *dst
> +and returns
> +.IR dst .
> +On failure, NULL is returned and elf_errno is set.  If
> +.I data
> +is NULL, then NULL is returned without setting elf_errno.

OK.

> +.SH SEE ALSO
> +.BR gelf_update_syminfo (3),
> +.BR libelf (3),
> +.BR elf (5)

Maybe gelf_getsym? If this really matches every symbol entry?

> +.SH ATTRIBUTES
> +.TS
> +allbox;
> +lbx lb lb
> +l l l.
> +Interface	Attribute	Value
> +T{
> +.na
> +.nh
> +.BR gelf_getsyminfo ()
> +T}	Thread safety	MT-Safe
> +.TE
> +
> +.SH REPORTING BUGS
> +Report bugs to <elfutils-devel@sourceware.org> or https://sourceware.org/bugzilla/.

OK.

Thanks,

Mark


More information about the Elfutils-devel mailing list