From: Aaron Merey Date: Tue, 28 Oct 2025 14:14:38 +0000 (-0400) Subject: doc: Add gelf_getshdr.3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=28f7c5398cea867273331f1f5fcc3d28cbcd685e;p=thirdparty%2Felfutils.git doc: Add gelf_getshdr.3 Signed-off-by: Aaron Merey --- diff --git a/doc/Makefile.am b/doc/Makefile.am index 3c22f0aa..5ee5c38b 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 \ libelf.3 # libdebuginfod man pages (also notrans) diff --git a/doc/gelf_getshdr.3 b/doc/gelf_getshdr.3 new file mode 100644 index 00000000..033f5dc0 --- /dev/null +++ b/doc/gelf_getshdr.3 @@ -0,0 +1,66 @@ +.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 + +.BI "GElf_Shdr *gelf_getshdr(Elf_Scn *" scn ", GElf_Shdr *" dst ");" +.fi + +.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 . + +.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. + +.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. + +.SH SEE ALSO +.BR elf32_getshdr (3), +.BR elf64_getshdr (3), +.BR gelf_update_shdr (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_getshdr () +T} Thread safety MT-Safe +.TE + +.SH REPORTING BUGS +Report bugs to or https://sourceware.org/bugzilla/.