Lines Matching defs:elf
1087 static Elf64_Shdr *elf_sec_hdr_by_idx(pelfio_t elf, size_t idx, Elf64_Shdr *sheader)
1089 psection_t psection = elfio_get_section_by_index(elf, idx);
1114 Elf *elf = NULL;
1117 pelfio_t elf;
1140 elf = elf_begin(fd, ELF_C_READ, NULL);
1142 elf = elfio_new();
1143 if (!elfio_load(elf, path)) {
1148 if (!elf) {
1154 if (!gelf_getehdr(elf, &ehdr)) {
1164 if (elf_getshdrstrndx(elf, &shstrndx)) {
1166 shstrndx = elfio_get_section_name_str_index(elf);
1175 if (!elf_rawdata(elf_getscn(elf, shstrndx), NULL)) {
1182 while ((scn = elf_nextscn(elf, scn)) != NULL) {
1185 psection_t psection = elfio_get_section_by_name(elf, ".shstrtab");
1193 int secno = elfio_get_sections_num(elf);
1204 if (!elf_sec_hdr_by_idx(elf, i, &sh)) {
1211 name = elf_strptr(elf, shstrndx, sh.sh_name);
1224 psection_t psection_index = elfio_get_section_by_index(elf, i);
1239 psection_t psection_index = elfio_get_section_by_index(elf, i);
1265 switch (gelf_getclass(elf)) {
1267 switch (elfio_get_class(elf)) {
1290 if (elf)
1292 elf_end(elf);
1294 elfio_delete(elf);