diff options
author | jkoshy <jkoshy@FreeBSD.org> | 2006-11-11 17:16:35 +0000 |
---|---|---|
committer | jkoshy <jkoshy@FreeBSD.org> | 2006-11-11 17:16:35 +0000 |
commit | 62913629e64cdad23072cfd4ad8340f4c0b91ec5 (patch) | |
tree | c2ad604787a38d6ad26a0bffea71f283f73e901d /lib/libelf/gelf_fsize.3 | |
parent | c51a2c2df9d95524e4fec5b0ec36ca0a9f503823 (diff) | |
download | FreeBSD-src-62913629e64cdad23072cfd4ad8340f4c0b91ec5.zip FreeBSD-src-62913629e64cdad23072cfd4ad8340f4c0b91ec5.tar.gz |
MFP4: Add an implementation of the ELF(3) and GELF(3) API set.
Bump __FreeBSD_version.
Reviewed by: jb
Diffstat (limited to 'lib/libelf/gelf_fsize.3')
-rw-r--r-- | lib/libelf/gelf_fsize.3 | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/lib/libelf/gelf_fsize.3 b/lib/libelf/gelf_fsize.3 new file mode 100644 index 0000000..681e338 --- /dev/null +++ b/lib/libelf/gelf_fsize.3 @@ -0,0 +1,93 @@ +.\" Copyright (c) 2006 Joseph Koshy. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" This software is provided by Joseph Koshy ``as is'' and +.\" any express or implied warranties, including, but not limited to, the +.\" implied warranties of merchantability and fitness for a particular purpose +.\" are disclaimed. in no event shall Joseph Koshy be liable +.\" for any direct, indirect, incidental, special, exemplary, or consequential +.\" damages (including, but not limited to, procurement of substitute goods +.\" or services; loss of use, data, or profits; or business interruption) +.\" however caused and on any theory of liability, whether in contract, strict +.\" liability, or tort (including negligence or otherwise) arising in any way +.\" out of the use of this software, even if advised of the possibility of +.\" such damage. +.\" +.\" $FreeBSD$ +.\" +.Dd July 3, 2006 +.Os +.Dt ELF 3 +.Sh NAME +.Nm gelf_fsize , +.Nm elf32_fsize , +.Nm elf64_fsize +.Nd return the size of a file type +.Sh LIBRARY +.Lb libelf +.Sh SYNOPSIS +.In libelf.h +.Ft size_t +.Fn elf32_fsize "Elf_Type type" "size_t count" "unsigned int version" +.Ft size_t +.Fn elf64_fsize "Elf_Type type" "size_t count" "unsigned int version" +.In gelf.h +.Fn gelf_fsize "Elf *elf" "Elf_Type type" "size_t count" "unsigned int version" +.Sh DESCRIPTION +These functions return the size in bytes of the file representation of +.Ar count +numbers of objects of ELF type +.Ar type . +.Pp +Functions +.Fn elf32_fsize +and +.Fn elf64_fsize +return sizes for files of class +.Dv ELFCLASS32 +and +.Dv ELFCLASS64 +respectively. +Function +.Fn gelf_fsize +returns the size for the class of ELF descriptor +.Ar elf . +.Sh RETURN VALUES +These functions return a non-zero value in case of success, or zero in +case of an error. +.Sh ERRORS +These functions may fail with: +.Bl -tag -width "[ELF_E_RESOURCE]" +.It Bq Er ELF_E_ARGUMENT +Argument +.Ar elf +was NULL in a call to +.Fn gelf_fsize . +.It Bq Er ELF_E_ARGUMENT +ELF descriptor +.Ar elf +had an unknown ELF class. +.It Bq Er ELF_E_ARGUMENT +Argument +.Ar type +contained an illegal value. +.It Bq Er ELF_E_UNIMPL +Support for ELF type +.Ar type +has not been implemented. +.It Bq Er ELF_E_VERSION +Argument +.Ar version +is not a supported version. +.El +.Sh SEE ALSO +.Xr elf 3 , +.Xr gelf 3
\ No newline at end of file |