Signed-off-by: Aaron Merey <ame...@redhat.com> --- doc/Makefile.am | 1 + doc/elf_nextscn.3 | 65 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 doc/elf_nextscn.3
diff --git a/doc/Makefile.am b/doc/Makefile.am index 022906bb..9ef2b60d 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -81,6 +81,7 @@ notrans_dist_man3_MANS= elf32_checksum.3 \ elf_ndxscn.3 \ elf_newdata.3 \ elf_newscn.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 <libelf.h> + +.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 <elfutils-devel@sourceware.org> or https://sourceware.org/bugzilla/. -- 2.49.0