'\" te .\" Copyright 1989 AT&T Copyright (c) 1989, 2014, Oracle and/or its affiliates. All rights reserved. .TH elf32_fsize 3ELF "8 September 2014" "SunOS 5.11" "ELF Library Functions" .SH NAME elf32_fsize, elf64_fsize \- return the size of an object file type .SH SYNOPSIS .LP .nf cc [ \fIflag\fR ... ] \fIfile\fR ... \fB-lelf\fR [ \fIlibrary\fR ... ] #include \fBsize_t\fR \fBelf32_fsize\fR(\fBElf_Type\fR \fItype\fR, \fBsize_t\fR \fIcount\fR, \fBuint_t\fR \fIver\fR); .fi .LP .nf \fBsize_t\fR \fBelf64_fsize\fR(\fBElf_Type\fR \fItype\fR, \fBsize_t\fR \fIcount\fR, \fBuint_t\fR \fIver\fR); .fi .SH DESCRIPTION .sp .LP \fBelf32_fsize()\fR gives the size in bytes of the 32-bit file representation of \fIcount\fR data objects with the given \fBtype\fR. The library uses version \fBver\fR to calculate the size. See \fBelf\fR(3ELF) and \fBelf_version\fR(3ELF). .sp .LP Constant values are available for the sizes of fundamental types: .sp .in +2 .nf Elf_Type File Size Memory Size ELF_T_ADDR ELF32_FSZ_ADDR sizeof(Elf32_Addr) ELF_T_BYTE 1 sizeof(unsigned char) ELF_T_HALF ELF32_FSZ_HALF sizeof(Elf32_Half) ELT_T_OFF ELF32_FSZ_OFF sizeof(Elf32_Off) ELF_T_SWORD ELF32_FSZ_SWORD sizeof(Elf32_Sword) ELF_T_WORD ELF32_FSZ_WORD sizeof(Elf32_Word) .fi .in -2 .sp .LP \fBelf32_fsize()\fR returns \fB0\fR if the value of \fBtype\fR or \fBver\fR is unknown. See \fBelf32_xlatetof\fR(3ELF) for a list of the \fBtype\fR values. .sp .LP For the 64\(mibit class, replace 32 with 64 as appropriate. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe .TE .SH SEE ALSO .sp .LP \fBelf\fR(3ELF), \fBelf32_xlatetof\fR(3ELF), \fBelf_version\fR(3ELF), \fBlibelf\fR(3LIB), \fBattributes\fR(5)