Hi Aaron,

On Wed, 2025-09-24 at 19:00 -0400, Aaron Merey wrote:
> Signed-off-by: Aaron Merey <[email protected]>
> ---
>  doc/Makefile.am    |  1 +
>  doc/gelf_getshdr.3 | 64 ++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 65 insertions(+)
>  create mode 100644 doc/gelf_getshdr.3
> 
> diff --git a/doc/Makefile.am b/doc/Makefile.am
> index e8d4c0a6..1a45b4bb 100644
> --- a/doc/Makefile.am
> +++ b/doc/Makefile.am
> @@ -93,6 +93,7 @@ notrans_dist_man3_MANS= elf32_checksum.3 \
>                       elf_version.3 \
>                       gelf_getclass.3 \
>                       gelf_getehdr.3 \
> +                     gelf_getshdr.3 \
>                       gelf_newehdr.3 \
>                       gelf_offscn.3 \
>                       gelf_update_ehdr.3 \

OK.

> diff --git a/doc/gelf_getshdr.3 b/doc/gelf_getshdr.3
> new file mode 100644
> index 00000000..76c11c8b
> --- /dev/null
> +++ b/doc/gelf_getshdr.3
> @@ -0,0 +1,64 @@
> +.TH GELF_GETSHDR 3 2025-09-22 "Libelf" "Libelf Programmer's Manual"
> +
> +.SH NAME
> +gelf_getshdr \- retrieve a section header into a class\-independent structure
> +
> +.SH SYNOPSIS
> +.nf
> +.B #include <gelf.h>
> +
> +.BI "GElf_Shdr *gelf_getshdr(Elf_Scn *" scn ", GElf_Shdr *" dst ");"
> +.fi

OK.

> +.SH DESCRIPTION
> +.BR gelf_getshdr ()
> +retrieves the section header associated with the section descriptor
> +.IR scn ,
> +translating it into the class\-independent
> +.B GElf_Shdr
> +representation. The header is copied into the structure referenced by
> +.IR dst .

OK.

> +.SH PARAMETERS
> +.TP
> +.I scn
> +Pointer to a section descriptor of type
> +.BR Elf_Scn .
> +
> +.TP
> +.I dst
> +Pointer to a caller\-provided
> +.B GElf_Shdr
> +structure to receive the section header.

OK.

> +.SH RETURN VALUE
> +On success,
> +.B gelf_getshdr()
> +stores the section header in
> +.I dst
> +and returns
> +.IR dst .
> +On failure, NULL is returned and elf_errno is set.  If
> +.I scn
> +is NULL then NULL is returned without setting elf_errno.

OK.

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

Add elf32_getshdr, elf64_getshdr.

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

OK.

Thanks,

Mark

Reply via email to