GELF_GETSYMINFO(3)

πŸ“¦
version 0.197 Β· 2 versions
, in alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, fedora 43, fedora 44, nixpkgs unstable, ubuntu stonking

πŸ’– 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 an Elf_Data for a section with type SHT_SUNW_syminfo and data type ELF_T_SYMINFO. yes, both. she's specific like that πŸ‘‘
  • ndx β€” the zero-based index of the additional symbol table information entry you want, within data. zero-based means the first one is 0, bestie, not 1, we've all been there 😭
  • dst β€” pointer to a caller-provided structure where the additional symbol information entry gets stored. must not be NULL. do not pass NULL. she will not be happy. πŸ’€

πŸ”₯ RETURN VALUE πŸ”₯

  • On success? she copies the requested additional symbol information entry into *dst and returns dst. slay. πŸŽ‰
  • On failure? NULL comes back and elf_errno gets set. so like, check it. 🌈
  • And one lil special case: if data is NULL, you get NULL back without elf_errno being set. no error, just vibes. noted. πŸ“
fr fr, don't confuse "returned NULL" with "something went wrong" here β€” if data was NULL to 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:

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