GELF_GETCLASS(3) Libelf Programmer's Manual GELF_GETCLASS(3) NAME gelf_getclass - return the ELF class (32-bit or 64-bit) for an object SYNOPSIS #include int gelf_getclass(Elf *elf); DESCRIPTION gelf_getclass() returns the class of the ELF object referenced by elf. The class of a valid ELF file will be one of: ELFCLASS32 The object is a 32-bit ELF class. ELFCLASS64 The object is a 64-bit ELF class. If elf does not denote a valid ELF object, or the class cannot be deter- mined, ELFCLASSNONE is returned. RETURN VALUE Returns ELFCLASS32 or ELFCLASS64 on success. If elf is NULL or does not refer to a valid ELF binary with kind ELF_K_ELF, then ELFCLASSNONE is re- turned. SEE ALSO elf_kind(3), libelf(3), elf(5) ATTRIBUTES allbox; lbx lb lb l l l. Interface Attribute Value T{ gelf_getclass() T} Thread safety MT-unsafe race REPORTING BUGS Report bugs to or https://source- ware.org/bugzilla/. Libelf 2025-09-14 GELF_GETCLASS(3)