Home | History | Annotate | Download | only in libelf

Lines Matching refs:Elf

1 /* Get ELF header.
44 __gelf_getehdr_rdlock (Elf *elf, GElf_Ehdr *dest)
48 if (elf == NULL)
51 if (unlikely (elf->kind != ELF_K_ELF))
59 if (offsetof (struct Elf, state.elf32.ehdr)
60 != offsetof (struct Elf, state.elf64.ehdr))
63 if (unlikely (elf->state.elf64.ehdr == NULL))
64 /* Maybe no ELF header was created yet. */
66 else if (elf->class == ELFCLASS32)
68 Elf32_Ehdr *ehdr = elf->state.elf32.ehdr;
91 result = memcpy (dest, elf->state.elf64.ehdr, sizeof (*dest));
97 gelf_getehdr (Elf *elf, GElf_Ehdr *dest)
100 if (elf == NULL)
103 rwlock_rdlock (elf->lock);
104 result = __gelf_getehdr_rdlock (elf, dest);
105 rwlock_unlock (elf->lock);