]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libelf/gelf_fsize.3
This commit was generated by cvs2svn to compensate for changes in r167612,
[FreeBSD/FreeBSD.git] / lib / libelf / gelf_fsize.3
1 .\" Copyright (c) 2006 Joseph Koshy.  All rights reserved.
2 .\"
3 .\" Redistribution and use in source and binary forms, with or without
4 .\" modification, are permitted provided that the following conditions
5 .\" are met:
6 .\" 1. Redistributions of source code must retain the above copyright
7 .\"    notice, this list of conditions and the following disclaimer.
8 .\" 2. Redistributions in binary form must reproduce the above copyright
9 .\"    notice, this list of conditions and the following disclaimer in the
10 .\"    documentation and/or other materials provided with the distribution.
11 .\"
12 .\" This software is provided by Joseph Koshy ``as is'' and
13 .\" any express or implied warranties, including, but not limited to, the
14 .\" implied warranties of merchantability and fitness for a particular purpose
15 .\" are disclaimed.  in no event shall Joseph Koshy be liable
16 .\" for any direct, indirect, incidental, special, exemplary, or consequential
17 .\" damages (including, but not limited to, procurement of substitute goods
18 .\" or services; loss of use, data, or profits; or business interruption)
19 .\" however caused and on any theory of liability, whether in contract, strict
20 .\" liability, or tort (including negligence or otherwise) arising in any way
21 .\" out of the use of this software, even if advised of the possibility of
22 .\" such damage.
23 .\"
24 .\" $FreeBSD$
25 .\"
26 .Dd July 3, 2006
27 .Os
28 .Dt GELF_FSIZE 3
29 .Sh NAME
30 .Nm gelf_fsize ,
31 .Nm elf32_fsize ,
32 .Nm elf64_fsize
33 .Nd return the size of a file type
34 .Sh LIBRARY
35 .Lb libelf
36 .Sh SYNOPSIS
37 .In libelf.h
38 .Ft size_t
39 .Fn elf32_fsize "Elf_Type type" "size_t count" "unsigned int version"
40 .Ft size_t
41 .Fn elf64_fsize "Elf_Type type" "size_t count" "unsigned int version"
42 .In gelf.h
43 .Fn gelf_fsize "Elf *elf" "Elf_Type type" "size_t count" "unsigned int version"
44 .Sh DESCRIPTION
45 These functions return the size in bytes of the file representation of
46 .Ar count
47 numbers of objects of ELF type
48 .Ar type .
49 .Pp
50 Functions
51 .Fn elf32_fsize
52 and
53 .Fn elf64_fsize
54 return sizes for files of class
55 .Dv ELFCLASS32
56 and
57 .Dv ELFCLASS64
58 respectively.
59 Function
60 .Fn gelf_fsize
61 returns the size for the class of ELF descriptor
62 .Ar elf .
63 .Sh RETURN VALUES
64 These functions return a non-zero value in case of success, or zero in
65 case of an error.
66 .Sh ERRORS
67 These functions may fail with:
68 .Bl -tag -width "[ELF_E_RESOURCE]"
69 .It Bq Er ELF_E_ARGUMENT
70 Argument
71 .Ar elf
72 was NULL in a call to
73 .Fn gelf_fsize .
74 .It Bq Er ELF_E_ARGUMENT
75 ELF descriptor
76 .Ar elf
77 had an unknown ELF class.
78 .It Bq Er ELF_E_ARGUMENT
79 Argument
80 .Ar type
81 contained an illegal value.
82 .It Bq Er ELF_E_UNIMPL
83 Support for ELF type
84 .Ar type
85 has not been implemented.
86 .It Bq Er ELF_E_VERSION
87 Argument
88 .Ar version
89 is not a supported version.
90 .El
91 .Sh SEE ALSO
92 .Xr elf 3 ,
93 .Xr gelf 3