Home | History | Annotate | Download | only in libelf

Lines Matching defs:elf

28 #include "elf-knowledge.h"
186 Elf *elf = scn->elf;
188 if (elf->class == ELFCLASS32)
226 entsize = SH_ENTSIZE_HASH (gelf_getehdr (elf, &ehdr_mem));
231 entsize = shtype_map[__libelf_version - 1][elf->class - 1][TYPEIDX (type)].size;
233 entsize = shtype_map[0][elf->class - 1][TYPEIDX (type)].size;
249 if (elf->map_address != NULL)
253 if (offset + size > elf->maximum_size)
261 = (char *) elf->map_address + elf->start_offset + offset;
263 else if (elf->fildes != -1)
275 if ((size_t) pread (elf->fildes, scn->rawdata.d.d_buf, size,
276 elf->start_offset + offset) != size)
295 /* Some broken ELF ABI for 64-bit machines use the wrong hash table
296 entry size. See elf-knowledge.h for more information. */
297 if (type == SHT_HASH && elf->class == ELFCLASS64)
301 scn->rawdata.d.d_type = (SH_ENTSIZE_HASH (gelf_getehdr (elf, &ehdr_mem))
308 shtype_map[__libelf_version - 1][elf->class - 1][TYPEIDX (type)].type;
311 shtype_map[0][elf->class - 1][TYPEIDX (type)].type;
316 if (elf->class == ELFCLASS32
317 || (offsetof (struct Elf, state.elf32.ehdr)
318 == offsetof (struct Elf, state.elf64.ehdr)))
320 elf->state.elf32.ehdr->e_ident[EI_VERSION];
323 elf->state.elf64.ehdr->e_ident[EI_VERSION];
342 Elf *elf;
347 if (unlikely (scn->elf->kind != ELF_K_ELF))
354 elf = scn->elf;
356 rwlock_rdlock (elf->lock);
410 rwlock_unlock (elf->lock);
411 rwlock_wrlock (elf->lock);
428 convert_data (scn, __libelf_version, elf->class,
429 (elf->class == ELFCLASS32
430 || (offsetof (struct Elf, state.elf32.ehdr)
431 == offsetof (struct Elf, state.elf64.ehdr))
432 ? elf->state.elf32.ehdr->e_ident[EI_DATA]
433 : elf->state.elf64.ehdr->e_ident[EI_DATA]),
450 rwlock_unlock (elf->lock);