GELF_GETSYMINFO(3)
π GELF_GETSYMINFO β the Libelf Programmer's Manual, section 3, bestie edition π
okay so picture this: you're deep in the Libelf programmer's manual, section 3, and you've found gelf_getsyminfo. she's niche. she's Sun/Solaris-coded. she's gonna hand you one (1) class-independent extra-symbol-info entry and you're gonna say thank you. let's go β¨
πΈ NAME πΈ
gelf_getsyminfo β grab the class-independent additional symbol information from the symbol table at whatever index you point at, no cap π«Ά
π¦ SYNOPSIS π¦
#include <gelf.h>
GElf_Syminfo *gelf_getsyminfo (Elf_Data *data, int ndx, GElf_Syminfo *dst);
look at her. three args, one return, zero drama. π
π DESCRIPTION π
So here's the tea: this function copies the additional symbol information entry out of data at index ndx, and drops it into the class-independent GElf_Syminfo structure that dst is pointing at. that's it. that's the whole job. she ate and left no crumbs π
now, important vibe check: data needs to be associated with an ELF section whose type is SHT_SUNW_syminfo and whose data type is ELF_T_SYMINFO. Those types are Sun/Solaris extensions β meaning they are not typically used in GNU/Linux ELF files. so if you're on Linux wondering why your section type is giving nothing... yeah. that's why. π
β¨ PARAMETERS β¨
dataβ a pointer to anElf_Datafor a section with typeSHT_SUNW_syminfoand data typeELF_T_SYMINFO. yes, both. she's specific like that πndxβ the zero-based index of the additional symbol table information entry you want, withindata. zero-based means the first one is0, bestie, not1, we've all been there πdstβ pointer to a caller-provided structure where the additional symbol information entry gets stored. must not beNULL. do not passNULL. she will not be happy. π
π₯ RETURN VALUE π₯
- On success? she copies the requested additional symbol information entry into
*dstand returnsdst. slay. π - On failure?
NULLcomes back andelf_errnogets set. so like, check it. π - And one lil special case: if
dataisNULL, you getNULLback withoutelf_errnobeing set. no error, just vibes. noted. π
fr fr, don't confuse "returned NULL" with "something went wrong" here β ifdatawasNULLto begin with, there's no errno to read. π«Ά
π SEE ALSO π
go read those too, they're all part of the same friend group π
π ATTRIBUTES π
- Interface:
gelf_getsyminfo() - Attribute: Thread safety
- Value:
MT-Safe
so yeah β she is MT-Safe, meaning multiple threads can call her and she keeps her composure. main character energy, truly. β
π REPORTING BUGS π
found a bug? (not me manifesting one, but like, hypothetically π) report it to:
<elfutils-devel@sourceware.org>- or the bugzilla:
https://sourceware.org/bugzilla/
they wanna hear from you, i promise π§
and that's the page!! this was GELF_GETSYMINFO(3) from the Libelf programmer's manual, dated 2025-12-30, version Libelf. take care of her, she's niche but she's iconic. mwah πβ¨ππ¦πΈπ
π«Ά
π¦ 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