From: Aaron Merey Date: Thu, 17 Jul 2025 20:56:46 +0000 (-0400) Subject: doc: Add elf_nextscn.3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5f14e65867cc35b335e7db90ff159dc0fc4798eb;p=thirdparty%2Felfutils.git doc: Add elf_nextscn.3 Signed-off-by: Aaron Merey --- diff --git a/doc/Makefile.am b/doc/Makefile.am index 0aca4281..1bbddb16 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -62,6 +62,7 @@ notrans_dist_man3_MANS= elf32_checksum.3 \ elf_hash.3 \ elf_kind.3 \ elf_ndxscn.3 \ + elf_nextscn.3 \ elf_update.3 \ elf_version.3 \ libelf.3 diff --git a/doc/elf_nextscn.3 b/doc/elf_nextscn.3 new file mode 100644 index 00000000..1aac00d0 --- /dev/null +++ b/doc/elf_nextscn.3 @@ -0,0 +1,65 @@ +.TH ELF_NEXTSCN 3 2025-06-30 "Libelf" "Libelf Programmer's Manual" + +.SH NAME +elf_nextscn - Return the next section in an ELF descriptor. + +.SH SYNOPSIS +.nf +#include + +.BI "Elf_Scn *elf_nextscn(Elf *" elf ", Elf_Scn *" scn ");" +.fi + +.SH DESCRIPTION +The +.BR elf_nextscn () +function returns a handle to the next section in the ELF object descriptor +.IR elf . +If +.I scn +is NULL, the first section (with index 1) is returned. Section index 0 is +reserved and skipped. + +If +.I scn +is not NULL, the section immediately following it is returned. If there are +no further sections, NULL is returned. + +.SH PARAMETERS +.TP +.I elf +A pointer to an ELF descriptor. +.TP +.I scn +A section handle returned by +.BR elf_getscn (3), +or NULL to begin iteration. + +.SH RETURN VALUE +Returns a pointer to the next +.B Elf_Scn +structure in the section list, or NULL if there are no more sections or if +.I elf +is NULL. + +.SH SEE ALSO +.BR elf_getscn (3), +.BR elf_newscn (3), +.BR libelf (3), +.BR elf (5) + +.SH ATTRIBUTES +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.na +.nh +.BR elf_nextscn () +T} Thread safety MT-Safe +.TE + +.SH REPORTING BUGS +Report bugs to or https://sourceware.org/bugzilla/.