GELF_GETVERSYM(3)
β¨ GELF_GETVERSYM(3) β¨
ok so bestie, welcome to the Libelf Programmer's Manual π you're literally about to read the page for gelf_getversym, gelf_getverdef, gelf_getverdaux, gelf_getverneed and gelf_getvernaux β the whole girl group π they're all about grabbing GNU symbol versioning entries, and yes they're class-independent, no cap.
πΈ NAME πΈ
gelf_getversym, gelf_getverdef, gelf_getverdaux, gelf_getverneed, gelf_getvernaux β retrieve GNU symbol versioning entries π
π¦ SYNOPSIS π¦
#include <gelf.h>
GElf_Versym *gelf_getversym (Elf_Data *data, int ndx, GElf_Versym *dst);
GElf_Verdef *gelf_getverdef (Elf_Data *data, int offset, GElf_Verdef *dst);
GElf_Verdaux *gelf_getverdaux(Elf_Data *data, int offset, GElf_Verdaux *dst);
GElf_Verneed *gelf_getverneed(Elf_Data *data, int offset, GElf_Verneed *dst);
GElf_Vernaux *gelf_getvernaux(Elf_Data *data, int offset, GElf_Vernaux *dst);
π DESCRIPTION π
so these five functions are giving class-independent access to GNU ELF symbol version information. like, you ask for an entry, they pull it out of data and tuck it into the dst you handed them. main character behavior fr fr β¨
gelf_getversym()β grabs the symbol version index at indexndxfrom theSHT_GNU_versymsection that goes withdata.gelf_getverdef()β grabs the version definition entry at section offsetoffsetfrom theSHT_GNU_verdefsection that goes withdata.gelf_getverdaux()β grabs the version definition auxiliary entry at section offsetoffsetfrom theSHT_GNU_verdefsection that goes withdata.gelf_getverneed()β grabs the version needed entry at section offsetoffsetfrom theSHT_GNU_verneedsection that goes withdata.gelf_getvernaux()β grabs the version needed auxiliary entry at section offsetoffsetfrom theSHT_GNU_verneedsection that goes withdata.
π PARAMETERS π
dataβ pointer to anElf_Datathat corresponds to the appropriate GNU versioning section πndxβ (only forgelf_getversym(), bestie, it's exclusive π ) zero-based index of the entry insidedata.offsetβ (forgelf_getverdef(),gelf_getverdaux(),gelf_getverneed(), andgelf_getvernaux()) the section-relative byte offset of the entry insidedata.dstβ pointer to a caller-provided entry of the appropriate type:GElf_Versym,GElf_Verdef,GElf_Verdaux,GElf_Verneed, orGElf_Vernaux. > this argument must not beNULL. like seriously, don't π
π RETURN VALUE π
on success, these functions store the requested entry in dst and return dst β slay π
on failure, they return NULL and set elf_errno π
and if data is NULL, then NULL is returned without setting elf_errno. noted, bestie.
β SEE ALSO β
gelf_update_verdaux(3), gelf_update_verdef(3), gelf_update_vernaux(3), gelf_update_verneed(3), gelf_update_versym(3), libelf(3), elf(5)
(the update girlies are the mirror twins of the get girlies, iykyk πͺ)
π ATTRIBUTES π
here's the vibe check on the interface attributes:
- Interface:
gelf_getversym(),gelf_getverdef(),gelf_getverdaux(),gelf_getverneed(),gelf_getvernaux() - Attribute: Thread safety
- Value:
MT-Safe
so yeah, all five of them are MT-Safe β thread-safe icons, we love to see it π§
π«Ά REPORTING BUGS π«Ά
found a bug? spill it to <elfutils-devel@sourceware.org> or drop it at https://sourceware.org/bugzilla/. they wanna hear it fr fr π
and that's the whole page, bestie π this was Libelf, dated 2025-09-27, page GELF_GETVERSYM(3) β go forth and read your symbol versions, you absolute icon π
β¨π¦
π¦ where this page comes from
- 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.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
- nixpkgs unstable: elfutils 0.195
- 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