gelf_update_versym3
Modify class-independent symbol versioning records
Usage
#include <gelf.h> int gelf_update_versym (Elf_Data *data, int ndx, GElf_Versym *src); int gelf_update_verdef (Elf_Data *data, int offset, GElf_Verdef *src); int gelf_update_verdaux(Elf_Data *data, int offset, GElf_Verdaux *src); int gelf_update_verneed(Elf_Data *data, int offset, GElf_Verneed *src); int gelf_update_vernaux(Elf_Data *data, int offset, GElf_Vernaux *src);
Overview
These functions provide class-independent modification of GNU ELF symbol versioning sections. Each function copies the contents of the caller-supplied src into the symbol versioning entry at the specified index or offset within data.
gelf_update_versym()-
Write a symbol version index into the
SHT_GNU_versymsection associated with data at index ndx.
gelf_update_verdef()-
Write a version definition entry into the
SHT_GNU_verdefsection associated with data at section offset offset.
gelf_update_verdaux()-
Write a version definition auxiliary entry into the
SHT_GNU_verdefsection associated with data at section offset offset.
gelf_update_verneed()-
Write a version needed entry into the
SHT_GNU_verneedsection associated with data at section offset offset.
gelf_update_vernaux()-
Write a version needed auxiliary entry into the
SHT_GNU_verneedsection associated with data at section offset offset.
Parameters
- data
-
Elf_Datapointer corresponding to the appropriate GNU symbol versioning section.
- ndx
-
(For
gelf_update_versym() only.) Zero-based index of the entry within data.
- offset
-
(For
gelf_update_verdef(),gelf_update_verdaux(),gelf_update_verneed(), andgelf_update_vernaux().) Section-relative byte offset of the entry within data.
- src
-
Pointer to the caller-supplied symbol:
GElf_Versym,GElf_Verdef,GElf_Verdaux,GElf_Verneed, orGElf_Vernauxas appropriate. This argument must not be NULL.
Return value
On success, these functions store the requested entry in src, mark the section corresponding to data with ELF_F_DIRTY and return a non-zero value. On failure, 0 is returned and elf_errno is set. If data is NULL, 0 is returned without setting elf_errno.
Attributes
| Interface | Attribute | Value |
| gelf_update_versym(), gelf_update_verdef(), gelf_update_verdaux(), gelf_update_verneed(), gelf_update_vernaux() | Thread safety | MT-Safe |