From: Aaron Merey Date: Thu, 1 Jan 2026 02:50:28 +0000 (-0500) Subject: doc: Add gelf_getchdr.3 X-Git-Tag: elfutils-0.195~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51a3c06d28635f6c0c0eb6f1b08214f4bc554c71;p=thirdparty%2Felfutils.git doc: Add gelf_getchdr.3 Signed-off-by: Aaron Merey --- diff --git a/doc/Makefile.am b/doc/Makefile.am index 820880aa..0c69859a 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -92,6 +92,7 @@ notrans_dist_man3_MANS= elf32_checksum.3 \ elf_update.3 \ elf_version.3 \ gelf_fsize.3 \ + gelf_getchdr.3 \ gelf_getclass.3 \ gelf_getehdr.3 \ gelf_getphdr.3 \ diff --git a/doc/gelf_getchdr.3 b/doc/gelf_getchdr.3 new file mode 100644 index 00000000..52fff6ac --- /dev/null +++ b/doc/gelf_getchdr.3 @@ -0,0 +1,70 @@ +.TH GELF_GETCHDR 3 2025-12-27 "Libelf" "Libelf Programmer's Manual" + +.SH NAME +gelf_getchdr \- retrieve the class\-independent compression header for an ELF +section with compressed data. + +.SH SYNOPSIS +.nf +.B #include + +.BI "GElf_Chdr *gelf_getchdr (Elf_Scn *" scn ", GElf_Chdr *" dest ");" + +.SH DESCRIPTION +Retrieve the class\-independent compression header for section +.I scn +with compressed data and store it in +.IR dest . +Sections with compressed data are indicated with the +.B SHF_COMPRESSED +flag. See +.BR libelf (3) +for more information regarding the compression header. + +.SH PARAMETERS +.TP +.I scn +Section whose compression header will be retrieved. The section's +.B SHF_COMPRESSED +flag must be set. + +.TP +.I dest +Pointer to a caller\-provided +.B GElf_Chdr +structure that will receive the class\-independent compression header for +.IR scn . + +.SH RETURN VALUE +On success, this function returns +.IR dest . +On failure, it returns NULL and sets elf_errno. If +.I scn +is NULL, then NULL is returned and elf_errno is not set. + +.SH SEE ALSO +.BR elf32_getchdr (3), +.BR elf64_getchdr (3), +.BR elf_compress (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_getchdr () +T} Thread safety MT-Safe +.TE + +.SH REPORTING BUGS +Report bugs to or https://sourceware.org/bugzilla/. + +.SH HISTORY +.B gelf_getchdr +first appeared in elfutils 0.165.