Home | History | Annotate | Download | only in libelf

Lines Matching defs:elf

63 #include "elf-knowledge.h"
198 Elf *elf = scn->elf;
200 if (elf->class == ELFCLASS32)
239 GElf_Ehdr *ehdr = __gelf_getehdr_rdlock (elf, &ehdr_mem);
246 || (t == ELF_T_GNUHASH && elf->class == ELFCLASS64))
249 entsize = __libelf_type_sizes[LIBELF_EV_IDX][elf->class - 1][t];
264 if (elf->map_address != NULL)
268 if (unlikely (offset + size > elf->maximum_size))
276 = (char *) elf->map_address + elf->start_offset + offset;
278 else if (likely (elf->fildes != -1))
290 ssize_t n = pread_retry (elf->fildes, scn->rawdata.d.d_buf, size,
291 elf->start_offset + offset);
311 /* Some broken ELF ABI for 64-bit machines use the wrong hash table
312 entry size. See elf-knowledge.h for more information. */
313 if (type == SHT_HASH && elf->class == ELFCLASS64)
316 GElf_Ehdr *ehdr = __gelf_getehdr_rdlock (elf, &ehdr_mem);
324 if (elf->class == ELFCLASS32
325 || (offsetof (struct Elf, state.elf32.ehdr)
326 == offsetof (struct Elf, state.elf64.ehdr)))
328 elf->state.elf32.ehdr->e_ident[EI_VERSION];
331 elf->state.elf64.ehdr->e_ident[EI_VERSION];
352 rwlock_wrlock (scn->elf->lock);
354 rwlock_unlock (scn->elf->lock);
366 Elf *elf;
372 if (unlikely (scn->elf->kind != ELF_K_ELF))
379 elf = scn->elf;
433 rwlock_unlock (elf->lock);
434 rwlock_wrlock (elf->lock);
454 rwlock_unlock (elf->lock);
455 rwlock_wrlock (elf->lock);
461 convert_data (scn, __libelf_version, elf->class,
462 (elf->class == ELFCLASS32
463 || (offsetof (struct Elf, state.elf32.ehdr)
464 == offsetof (struct Elf, state.elf64.ehdr))
465 ? elf->state.elf32.ehdr->e_ident[EI_DATA]
466 : elf->state.elf64.ehdr->e_ident[EI_DATA]),
500 rwlock_rdlock (scn->elf->lock);
502 rwlock_unlock (scn->elf->lock);