Lines Matching refs:elf
45 getehdr_impl (Elf *elf, int wrlock) in ElfW2()
47 if (elf == NULL) in ElfW2()
50 if (unlikely (elf->kind != ELF_K_ELF)) in ElfW2()
57 if (elf->class == 0) in ElfW2()
61 rwlock_unlock (elf->lock); in ElfW2()
62 rwlock_wrlock (elf->lock); in ElfW2()
66 elf->class = ELFW(ELFCLASS,LIBELFBITS); in ElfW2()
68 else if (unlikely (elf->class != ELFW(ELFCLASS,LIBELFBITS))) in ElfW2()
74 return elf->state.ELFW(elf,LIBELFBITS).ehdr; in ElfW2()
79 __elfw2(LIBELFBITS,getehdr_wrlock) (Elf *elf) in ElfW2()
81 return getehdr_impl (elf, 1); in ElfW2()
85 elfw2(LIBELFBITS,getehdr) (Elf *elf) in ElfW2()
88 if (elf == NULL) in ElfW2()
91 rwlock_rdlock (elf->lock); in ElfW2()
92 result = getehdr_impl (elf, 0); in ElfW2()
93 rwlock_unlock (elf->lock); in ElfW2()