12de3b87aSKai Wang.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved. 22de3b87aSKai Wang.\" 32de3b87aSKai Wang.\" Redistribution and use in source and binary forms, with or without 42de3b87aSKai Wang.\" modification, are permitted provided that the following conditions 52de3b87aSKai Wang.\" are met: 62de3b87aSKai Wang.\" 1. Redistributions of source code must retain the above copyright 72de3b87aSKai Wang.\" notice, this list of conditions and the following disclaimer. 82de3b87aSKai Wang.\" 2. Redistributions in binary form must reproduce the above copyright 92de3b87aSKai Wang.\" notice, this list of conditions and the following disclaimer in the 102de3b87aSKai Wang.\" documentation and/or other materials provided with the distribution. 112de3b87aSKai Wang.\" 122de3b87aSKai Wang.\" This software is provided by Joseph Koshy ``as is'' and 132de3b87aSKai Wang.\" any express or implied warranties, including, but not limited to, the 142de3b87aSKai Wang.\" implied warranties of merchantability and fitness for a particular purpose 152de3b87aSKai Wang.\" are disclaimed. in no event shall Joseph Koshy be liable 162de3b87aSKai Wang.\" for any direct, indirect, incidental, special, exemplary, or consequential 172de3b87aSKai Wang.\" damages (including, but not limited to, procurement of substitute goods 182de3b87aSKai Wang.\" or services; loss of use, data, or profits; or business interruption) 192de3b87aSKai Wang.\" however caused and on any theory of liability, whether in contract, strict 202de3b87aSKai Wang.\" liability, or tort (including negligence or otherwise) arising in any way 212de3b87aSKai Wang.\" out of the use of this software, even if advised of the possibility of 222de3b87aSKai Wang.\" such damage. 232de3b87aSKai Wang.\" 24*ae500c1fSEd Maste.\" $Id: gelf_fsize.3 3639 2018-10-14 14:07:02Z jkoshy $ 252de3b87aSKai Wang.\" 262de3b87aSKai Wang.Dd February 5, 2008 272de3b87aSKai Wang.Dt GELF_FSIZE 3 28*ae500c1fSEd Maste.Os 292de3b87aSKai Wang.Sh NAME 302de3b87aSKai Wang.Nm gelf_fsize , 312de3b87aSKai Wang.Nm elf32_fsize , 322de3b87aSKai Wang.Nm elf64_fsize 332de3b87aSKai Wang.Nd return the size of a file type 342de3b87aSKai Wang.Sh LIBRARY 352de3b87aSKai Wang.Lb libelf 362de3b87aSKai Wang.Sh SYNOPSIS 372de3b87aSKai Wang.In libelf.h 382de3b87aSKai Wang.Ft size_t 392de3b87aSKai Wang.Fn elf32_fsize "Elf_Type type" "size_t count" "unsigned int version" 402de3b87aSKai Wang.Ft size_t 412de3b87aSKai Wang.Fn elf64_fsize "Elf_Type type" "size_t count" "unsigned int version" 422de3b87aSKai Wang.In gelf.h 432de3b87aSKai Wang.Ft size_t 442de3b87aSKai Wang.Fn gelf_fsize "Elf *elf" "Elf_Type type" "size_t count" "unsigned int version" 452de3b87aSKai Wang.Sh DESCRIPTION 462de3b87aSKai WangThese functions return the size in bytes of the file representation of 472de3b87aSKai Wang.Ar count 482de3b87aSKai Wangnumbers of objects of ELF type 492de3b87aSKai Wang.Ar type . 502de3b87aSKai WangFor ELF types that are of variable length, these functions return a 512de3b87aSKai Wangsize of one byte. 522de3b87aSKai Wang.Pp 532de3b87aSKai WangFunctions 542de3b87aSKai Wang.Fn elf32_fsize 552de3b87aSKai Wangand 562de3b87aSKai Wang.Fn elf64_fsize 572de3b87aSKai Wangreturn sizes for files of class 582de3b87aSKai Wang.Dv ELFCLASS32 592de3b87aSKai Wangand 602de3b87aSKai Wang.Dv ELFCLASS64 612de3b87aSKai Wangrespectively. 622de3b87aSKai WangFunction 632de3b87aSKai Wang.Fn gelf_fsize 642de3b87aSKai Wangreturns the size for the class of ELF descriptor 652de3b87aSKai Wang.Ar elf . 662de3b87aSKai Wang.Sh RETURN VALUES 672de3b87aSKai WangThese functions return a non-zero value in case of success, or zero in 682de3b87aSKai Wangcase of an error. 692de3b87aSKai Wang.Sh ERRORS 702de3b87aSKai WangThese functions may fail with: 712de3b87aSKai Wang.Bl -tag -width "[ELF_E_RESOURCE]" 722de3b87aSKai Wang.It Bq Er ELF_E_ARGUMENT 732de3b87aSKai WangArgument 742de3b87aSKai Wang.Ar elf 752de3b87aSKai Wangwas NULL in a call to 762de3b87aSKai Wang.Fn gelf_fsize . 772de3b87aSKai Wang.It Bq Er ELF_E_ARGUMENT 782de3b87aSKai WangELF descriptor 792de3b87aSKai Wang.Ar elf 802de3b87aSKai Wanghad an unknown ELF class. 812de3b87aSKai Wang.It Bq Er ELF_E_ARGUMENT 822de3b87aSKai WangArgument 832de3b87aSKai Wang.Ar type 842de3b87aSKai Wangcontained an illegal value. 852de3b87aSKai Wang.It Bq Er ELF_E_UNIMPL 862de3b87aSKai WangSupport for ELF type 872de3b87aSKai Wang.Ar type 882de3b87aSKai Wanghas not been implemented. 892de3b87aSKai Wang.It Bq Er ELF_E_VERSION 902de3b87aSKai WangArgument 912de3b87aSKai Wang.Ar version 922de3b87aSKai Wangis not a supported version. 932de3b87aSKai Wang.El 942de3b87aSKai Wang.Sh SEE ALSO 952de3b87aSKai Wang.Xr elf 3 , 962de3b87aSKai Wang.Xr gelf 3 97