Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ elf32_fsize(3E) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

elf(3E)



ELFFSIZE(3E)                                                    ELFFSIZE(3E)



NAME
     elffsize: elf32fsize elf64fsize - return the size of an object file
     type

SYNOPSIS
     cc [flag ...] file ...  -lelf [library ...]

     #include <libelf.h>

sizet elf32fsize(ElfType type, sizet count, unsigned ver);
sizet elf64fsize(ElfType type, sizet count, unsigned ver);
#define LIBELFXTND64
Elf64Xword elf64fsize(ElfType type, Elf64Xword count, unsigned ver);
DESCRIPTION
elf32fsize gives the size in bytes of the 32-bit file representation of
count data objects with the given type. The library uses version ver to
calculate the size [see elf(3E) and elfversion(3E)].
Constant values are available for the sizes of fundamental types.
ElfType File Size Memory Size
_____________________________________________________
| |
ELFTADDR ELF32FSZADDR sizeof(Elf32Addr)
| |
ELFTBYTE 1 sizeof(unsigned char)
| |
ELFTHALF ELF32FSZHALF sizeof(Elf32Half)
| |
ELTTOFF ELF32FSZOFF sizeof(Elf32Off)
| |
ELFTSWORD ELF32FSZSWORD sizeof(Elf32Sword)
| |
ELFTWORD ELF32FSZWORD sizeof(Elf32Word)
| |
____________|_________________|______________________
elf32fsize returns zero if the value of type or ver is unknown. See
elfxlate(3E) for a list of the type values.
The 64-bit class works identically, simply replacing all instances of 32
in the description and table with 64.
SEE ALSO
elf(3E), elfversion(3E), elfxlate(3E).
NOTES
The use of a sizet in a 32-bit compile with elf64fsize is unfortunate,
since that makes it impossible to deal with certain object files. If,
when the 32-bit app is compiled, _LIBELF_XTND_64 is defined, then the
function interface changes to have 64-bit fields. If LIBELFXTND64 is
defined at compile-time, then instead of linking with -lelf, link with
-lelf_xtnd. There is a corresponding -ldwarfxtnd. It is essential that
a 32-bit application compiled with _LIBELF_XTND_64 be *entirely* compiled
with LIBELFXTND64 defined.
Page 1


ELFFSIZE(3E)                                                    ELFFSIZE(3E)



     Applications which are built as 64-bit applications can ignore
     _LIBELF_XTND_64: it has no effect on them and 64-bit applications always
     link with -lelf never with -lelf_xtnd.




















































                                                                        Page 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026