Lines Matching defs:elf
41 #include "elf-knowledge.h"
121 entry size. See elf-knowledge.h for more information. */
221 Elf *elf = scn->elf;
223 if (elf->class == ELFCLASS32)
268 align = __libelf_type_align (elf->class, ELF_T_CHDR);
273 GElf_Ehdr *ehdr = __gelf_getehdr_rdlock (elf, &ehdr_mem);
284 || (t == ELF_T_GNUHASH && elf->class == ELFCLASS64))
287 entsize = __libelf_type_sizes[elf->class - 1][t];
302 if (elf->map_address != NULL)
307 if (unlikely (offset > elf->maximum_size
308 || elf->maximum_size - offset < size))
316 = (char *) elf->map_address + elf->start_offset + offset;
318 else if (likely (elf->fildes != -1))
323 if (unlikely (offset > elf->maximum_size
324 || elf->maximum_size - offset < size))
340 ssize_t n = pread_retry (elf->fildes, scn->rawdata.d.d_buf, size,
341 elf->start_offset + offset);
369 GElf_Ehdr *ehdr = __gelf_getehdr_rdlock (elf, &ehdr_mem);
401 if (elf->class == ELFCLASS32
405 elf->state.elf32.ehdr->e_ident[EI_VERSION];
408 elf->state.elf64.ehdr->e_ident[EI_VERSION];
429 rwlock_wrlock (scn->elf->lock);
431 rwlock_unlock (scn->elf->lock);
442 Elf *elf = scn->elf;
448 rwlock_unlock (elf->lock);
449 rwlock_wrlock (elf->lock);
455 convert_data (scn, elf->class,
456 (elf->class == ELFCLASS32
459 ? elf->state.elf32.ehdr->e_ident[EI_DATA]
460 : elf->state.elf64.ehdr->e_ident[EI_DATA]),
479 Elf *elf;
485 if (unlikely (scn->elf->kind != ELF_K_ELF))
492 elf = scn->elf;
546 rwlock_unlock (elf->lock);
547 rwlock_wrlock (elf->lock);
579 rwlock_rdlock (scn->elf->lock);
581 rwlock_unlock (scn->elf->lock);