GELF_UPDATE_AUXV(3)
β¨ GELF_UPDATE_AUXV β¨
ok so this is from the Libelf Programmer's Manual bestie, section 3, and it's literally about poking new values into the auxiliary vector π
πΈ NAME πΈ
gelf_update_auxv β update the info in the auxiliary vector at the index you picked π
π¦ SYNOPSIS π¦
#include <gelf.h>
int gelf_update_auxv (Elf_Data *data, int ndx, GElf_auxv_t *src);
π DESCRIPTION π
So basically: you take a class-independent auxiliary vector entry from src and you copy it into the NT_AUXV note that's associated with data, at index ndx. That's the whole vibe. π
If you want the full lore on what the auxiliary vector even is, go peek at getauxval(3) β she explains it way better than I could in one breath.
π PARAMETERS π
dataβ a pointer to anElf_Datathat's associated with anNT_AUXVELF note.data->d_typeshould beELF_T_AUXV. TheseNT_AUXVnotes are normally found hanging out in core files. You can also read the auxiliary vector straight from/proc/PID/auxvof a live process β but heads up, in that case this function does not write back todataitself. no cap. πndxβ the zero-based index of the auxiliary vector entry you want to update insidedata. zero-based, bestie, we start counting at 0 around here.srcβ a pointer to an auxiliary vector entry that you provide. ForELFCLASS32binaries,a_typeanda_valhave to fit inside unsigned 32-bit values. andsrcmust not beNULL. π
β RETURN VALUE β
When it works: you get a non-zero value back, the auxiliary vector entry at index ndx in data gets updated, and the section or segment associated with data gets marked with ELF_F_DIRTY (she's dirty, she knows π«Ά).
When it doesn't work: you get zero, and elf_errno is set so you can go find out why.
Special little edge case for you: if data is NULL, you just get zero back β and elf_errno is not set. that's it. that's the whole situation. π
π₯ SEE ALSO π₯
π ATTRIBUTES π
- Interface:
gelf_update_auxv() - Attribute: Thread safety
- Value:
MT-Safeβ¨
(translation: she's safe to call from multiple threads, go off queen)
π REPORTING BUGS π
Found a bug? Don't suffer in silence, tell the people:
<elfutils-devel@sourceware.org>https://sourceware.org/bugzilla/
π§ HISTORY π§
this section is empty in the original, soβ¦ nothing to report bestie, the history is giving silence πΈ
ok and for the little sign-off moment: this page is from Libelf, dated 2025-12-31, and it lives at GELF_UPDATE_AUXV(3). that's the whole page, you ate it, periodt π β¨
π¦ 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