gelf_update_lib3
Update prelink library in table at the given index
Usage
#include <gelf.h> int gelf_update_lib (Elf_Data *data, int ndx, GElf_Lib *src);
Overview
Copy a class-independent prelink library table entry from src into the SHT_GNU_LIBLIST. section associated with data at index ndx.
data must be an Elf_Data* associated with a section of type SHT_GNU_LIBLIST. data->d_type should be ELF_T_LIB. SHT_GNU_LIBLIST sections are used by the prelink utility. See https://sourceware.org/gnu-gabi/prelink.txt for more information.
Parameters
- data
-
Pointer to an
Elf_Dataassociated with a section with typeSHT_GNU_LIBLIST. data->d_type should beELF_T_LIB.
- ndx
-
Zero-based index of the prelink library table entry to be updated within data.
- src
-
Pointer to a caller-provided prelink library table entry. src must not be NULL.
Return value
On success, this function returns a non-zero value and updates the prelink library table entry at index ndx in data. The section associated with data is flagged with ELF_F_DIRTY. On failure, zero is returned and elf_errno is set. If data is NULL, then zero is returned and elf_errno is not set.
Attributes
| Interface | Attribute | Value |
| gelf_update_lib() | Thread safety | MT-Safe |