Signed-off-by: Aaron Merey <ame...@redhat.com> --- doc/elf32_fsize.3 | 59 +++++++++++++++++++++++++++++++++++++++++++++++ doc/elf64_fsize.3 | 59 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 doc/elf32_fsize.3 create mode 100644 doc/elf64_fsize.3
diff --git a/doc/elf32_fsize.3 b/doc/elf32_fsize.3 new file mode 100644 index 00000000..ea86157f --- /dev/null +++ b/doc/elf32_fsize.3 @@ -0,0 +1,59 @@ +.TH ELF32_FSIZE 3 2024-08-14 "Libelf" "Libelf Programmer's Manual" + +.SH NAME +elf32_fsize \- calculate the file size of various ELF32 data structures + +.SH SYNOPSIS +.B #include <libelf.h> + +.BI "size_t elf32_fsize(Elf_Type " type ", size_t " count ", unsigned int " version ");" + +.SH DESCRIPTION +Calculate the file size in bytes of various ELF32 data structures, +given their type and count. + +.SH PARAMETERS +.TP +.I type +The ELF32 data structure type for which the file size is to be calculated. See +.BR libelf.h +for a list of valid +.BR Elf_Type +values. + +.TP +.I count +The number of elements of the specified type. + +.TP +.I version +The ELF version. This should be set to +.B EV_CURRENT. + +.SH RETURN VALUE +The size in bytes of the specified count and type of data structure. If an error occurs, +return 0 and set a libelf error code. + +.SH SEE ALSO +.BR elf_errno (3), +.BR elf64_fsize (3), +.BR libelf (3), +.BR elf (5) + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.na +.nh +.BR elf32_fsize () +T} Thread safety MT-Safe +.TE + +.SH REPORTING BUGS +Report bugs to <elfutils-devel@sourceware.org> or https://sourceware.org/bugzilla/. diff --git a/doc/elf64_fsize.3 b/doc/elf64_fsize.3 new file mode 100644 index 00000000..45e1d04c --- /dev/null +++ b/doc/elf64_fsize.3 @@ -0,0 +1,59 @@ +.TH ELF64_FSIZE 3 2024-08-14 "Libelf" "Libelf Programmer's Manual" + +.SH NAME +elf64_fsize \- calculate the file size of various ELF64 data structures + +.SH SYNOPSIS +.B #include <libelf.h> + +.BI "size_t elf64_fsize(Elf_Type " type ", size_t " count ", unsigned int " version ");" + +.SH DESCRIPTION +Calculate the file size in bytes of various ELF64 data structures, +given their type and count. + +.SH PARAMETERS +.TP +.I type +The ELF64 data structure type for which the file size is to be calculated. See +.BR libelf.h +for a list of valid +.BR Elf_Type +values. + +.TP +.I count +The number of elements of the specified type. + +.TP +.I version +The ELF version. This should be set to +.B EV_CURRENT. + +.SH RETURN VALUE +The size in bytes of the specified count and type of data structure. If an error occurs, +return 0 and set a libelf error code. + +.SH SEE ALSO +.BR elf_errno (3), +.BR elf32_fsize (3), +.BR libelf (3), +.BR elf (5) + +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.na +.nh +.BR elf64_fsize () +T} Thread safety MT-Safe +.TE + +.SH REPORTING BUGS +Report bugs to <elfutils-devel@sourceware.org> or https://sourceware.org/bugzilla/. -- 2.46.0