ELF_KIND(3)
π ELF_KIND(3) π
okay bestie, welcome to the Libelf Programmer's Manual β this is the page for elf_kind, and no cap it's a lil cutie. let's get into it π¦
β¨ NAME β¨
elf_kind β figure out what kind of file an ELF descriptor is actually pointing at π
πΈ SYNOPSIS πΈ
#include <libelf.h>
Elf_Kind elf_kind(Elf *elf);
π DESCRIPTION π
so elf_kind checks the file type of whatever file that elf descriptor is representing. and like, this type tells you whether the descriptor is holding an ELF object, an archive member, or some other type of file entirely. it's giving "who dis" but for file formats π
π PARAMETERS π
- elf β the ELF descriptor. that's it, that's the whole list, she's lowkey simple like that π«Ά
π RETURN VALUE π
it hands you back the file type of the file that elf represents. the possible return values are:
ELF_K_NONEβ unknown file type. mystery behavior, we simply don't know her πELF_K_ARβ archive member. hi bestie, you came out of anararchive π¦ELF_K_COFFβ COFF object file. β οΈ heads up: COFF is not supported by elfutils libelf, so don't get your hopes up fr frELF_K_ELFβ ELF object file. the main character, the moment, the icon π
π SEE ALSO π
ar(1), ranlib(1), libelf(3), elf(5) β go read these next, iykyk πβ¨
β ATTRIBUTES β
for an explanation of the terms used in this section, go peek at attributes(7).
- Interface:
elf_kind() - Attribute: Thread safety
- Value:
MT-Safe
translation: she's MT-Safe, so multiple threads can vibe with her at the same time, no drama π
π REPORTING BUGS π
found a bug? report it to <elfutils-devel@sourceware.org> or hit up https://sourceware.org/bugzilla/. we're listening, we promise π«Ά
and that's the whole page, bestie!! this was Libelf, dated 2025-03-31, and you just read ELF_KIND(3) β ate and left no crumbs πβ¨ππ¦πΈπ
π¦ where this page comes from
- alpine 3.23: elfutils-doc 0.194-r0 Β· GPL-3.0-or-later AND ( GPL-2.0-or-later OR LGPL-3.0-or-later )
- alpine 3.24: elfutils-doc 0.195-r0 Β· GPL-3.0-or-later AND ( GPL-2.0-or-later OR LGPL-3.0-or-later )
- arch rolling: libelf 0.196-1
- arch rolling: libelf 0.197-1 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- centos-stream 10: elfutils-libelf-devel 0.197-1.el10 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- centos-stream 9: elfutils-libelf-devel 0.197-1.el9 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- centos-stream 9: elfutils-libelf-devel 0.197-1.el9 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- fedora 43: elfutils-libelf-devel 0.196-1.fc43
- fedora 43: elfutils-libelf-devel 0.196-1.fc43
- fedora 43: elfutils-libelf-devel 0.197-1.fc43 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- fedora 43: elfutils-libelf-devel 0.197-1.fc43 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- fedora 44: elfutils-libelf-devel 0.194-5.fc44 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- fedora 44: elfutils-libelf-devel 0.194-5.fc44 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- fedora 44: elfutils-libelf-devel 0.196-1.fc44
- fedora 44: elfutils-libelf-devel 0.196-1.fc44
- fedora 44: elfutils-libelf-devel 0.197-1.fc44 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- fedora 44: elfutils-libelf-devel 0.197-1.fc44 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- nixos 26.05: elfutils 0.194
- nixpkgs unstable: elfutils 0.195
- ubuntu resolute: libelf-dev 0.194-4 Β· GPL-3.0-or-later
- ubuntu stonking: libelf-dev 0.196-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms