GELF_UPDATE_SYMINFO(3)
β¨ GELF_UPDATE_SYMINFO(3) β¨
okay bestie, welcome to the Libelf Programmer's Manual π you're here for gelf_update_syminfo, and honestly? iconic function, very niche, very Sun-coded. let's get into it π«Ά
πΈ NAME πΈ
gelf_update_syminfo β updates the additional symbol info in the symbol table at whatever index you point at, no cap π
π SYNOPSIS π
#include <gelf.h>
int gelf_update_syminfo (Elf_Data *data, int ndx, GElf_Syminfo *src);
π¦ DESCRIPTION π¦
So what it does is: it copies a class-independent additional symbol information entry out of src, and drops it into the SHT_SUNW_syminfo section that's associated with data, at entry index ndx. Like, moving one little entry from here to there. slay π§
now, data needs to be associated with an ELF section whose type is SHT_SUNW_syminfo and whose data type is ELF_T_SYMINFO. important!! β οΈ
heads up babes: these types are Sun/Solaris extensions and they are not typically used in GNU/Linux ELF files. so if you're on Linux wondering why you've never met SHT_SUNW_syminfo at a party β that's why π
π PARAMETERS π
dataβ a pointer to anElf_Datathat's associated with an ELF section of typeSHT_SUNW_syminfoand data typeELF_T_SYMINFO. (yes the original really does say "section with type for a section with type", we're all just vibing through it π)ndxβ the zero-based index of the entry insidedatathat you want updated. zero-based, so the first one is0, not1, don't come at me βsrcβ a pointer to a caller-provided additional symbol information entry. must not beNULL, fr fr π«
π RETURN VALUE π
- on success? it returns a non-zero value π and it updates
datawithsrcat indexndx. also the section associated withdatagets flagged withELF_F_DIRTY⨠(she's marked, she's changed, she needs writing back) - on failure? zero is returned, and
elf_errnogets set. classic. - and if
dataisNULL? zero is returned β butelf_errnois not set. yeah. special case. periodt π
π SEE ALSO π
π ATTRIBUTES π
- Interface:
gelf_update_syminfo() - Attribute: Thread safety
- Value:
MT-Safe
so like, she's MT-Safe, you can bring her to the multithreaded function π«Ά
π REPORTING BUGS π
found a bug? don't suffer in silence bestie. report it to <elfutils-devel@sourceware.org> or hit up https://sourceware.org/bugzilla/ and tell them everything π
and that's the whole page, no notes. this one came from Libelf, dated 2025-12-30, and it's the GELF_UPDATE_SYMINFO(3) page β mwah, go update some Sun symbol info responsibly, i believe in you πβ¨
π¦ 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