kernel: bwrite_common's 3rd & 4th args can be bools
[unleashed.git] / share / man / man3elf / elf32_fsize.3elf
blob36a03e3bce1a88e58a5b3cbdf1cb6eb32299690b
1 '\" te
2 .\"  Copyright 1989 AT&T  Copyright (c) 2001, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH ELF32_FSIZE 3ELF "Jul 11, 2001"
7 .SH NAME
8 elf32_fsize, elf64_fsize \- return the size of an object file type
9 .SH SYNOPSIS
10 .LP
11 .nf
12 cc [ \fIflag\fR ... ] \fIfile\fR ... \fB-lelf\fR [ \fIlibrary\fR ... ]
13 #include <libelf.h>
15 \fBsize_t\fR \fBelf32_fsize\fR(\fBElf_Type\fR \fItype\fR, \fBsize_t\fR \fIcount\fR, \fBunsigned\fR \fIver\fR);
16 .fi
18 .LP
19 .nf
20 \fBsize_t\fR \fBelf64_fsize\fR(\fBElf_Type\fR \fItype\fR, \fBsize_t\fR \fIcount\fR, \fBunsigned\fR \fIver\fR);
21 .fi
23 .SH DESCRIPTION
24 .sp
25 .LP
26 \fBelf32_fsize()\fR gives the size in bytes of the 32-bit file representation
27 of \fIcount\fR data objects with the given \fBtype\fR. The library uses version
28 \fBver\fR to calculate the size. See \fBelf\fR(3ELF) and
29 \fBelf_version\fR(3ELF).
30 .sp
31 .LP
32 Constant values are available for the sizes of fundamental types:
33 .sp
34 .in +2
35 .nf
36 \fBElf_Type     File Size       Memory Size
37 ELF_T_ADDR      ELF32_FSZ_ADDR  sizeof(Elf32_Addr)
38 ELF_T_BYTE      1       sizeof(unsigned char)
39 ELF_T_HALF      ELF32_FSZ_HALF  sizeof(Elf32_Half)
40 ELT_T_OFF       ELF32_FSZ_OFF   sizeof(Elf32_Off)
41 ELF_T_SWORD     ELF32_FSZ_SWORD sizeof(Elf32_Sword)
42 ELF_T_WORD      ELF32_FSZ_WORD  sizeof(Elf32_Word)\fR
43 .fi
44 .in -2
46 .sp
47 .LP
48 \fBelf32_fsize()\fR returns \fB0\fR if the value of \fBtype\fR or \fBver\fR is
49 unknown. See \fBelf32_xlatetof\fR(3ELF) for a list of the \fBtype\fR values.
50 .sp
51 .LP
52 For the 64\(mibit class, replace 32 with 64 as appropriate.
53 .SH ATTRIBUTES
54 .sp
55 .LP
56 See \fBattributes\fR(5) for descriptions of the following attributes:
57 .sp
59 .sp
60 .TS
61 box;
62 c | c
63 l | l .
64 ATTRIBUTE TYPE  ATTRIBUTE VALUE
66 Interface Stability     Stable
68 MT-Level        MT-Safe
69 .TE
71 .SH SEE ALSO
72 .sp
73 .LP
74 \fBelf\fR(3ELF), \fBelf32_xlatetof\fR(3ELF), \fBelf_version\fR(3ELF),
75 \fBlibelf\fR(3LIB), \fBattributes\fR(5)