Home | History | Annotate | Download | only in libelf

Lines Matching refs:Elf

1 /* Get ELF program header table.
70 __elfw2(LIBELFBITS,getphdr_wrlock) (elf)
71 Elf *elf;
78 result = elf->state.ELFW(elf,LIBELFBITS).phdr;
82 if (elf->class == 0)
83 elf->class = ELFW(ELFCLASS,LIBELFBITS);
84 else if (elf->class != ELFW(ELFCLASS,LIBELFBITS))
94 ElfW2(LIBELFBITS,Ehdr) *ehdr = elf->state.ELFW(elf,LIBELFBITS).ehdr;
106 if (elf->map_address != NULL)
109 void *file_phdr = ((char *) elf->map_address
110 + elf->start_offset + ehdr->e_phoff);
116 elf->state.ELFW(elf,LIBELFBITS).phdr = file_phdr;
123 of entries from the ELF header. */
124 phdr = elf->state.ELFW(elf,LIBELFBITS).phdr =
126 if (elf->state.ELFW(elf,LIBELFBITS).phdr == NULL)
131 elf->state.ELFW(elf,LIBELFBITS).phdr_flags |=
168 else if (likely (elf->fildes != -1))
171 of entries from the ELF header. */
172 elf->state.ELFW(elf,LIBELFBITS).phdr =
174 if (elf->state.ELFW(elf,LIBELFBITS).phdr == NULL)
179 elf->state.ELFW(elf,LIBELFBITS).phdr_flags |= ELF_F_MALLOCED;
182 ssize_t n = pread_retry (elf->fildes,
183 elf->state.ELFW(elf,LIBELFBITS).phdr, size,
184 elf->start_offset + ehdr->e_phoff);
189 free (elf->state.ELFW(elf,LIBELFBITS).phdr);
190 elf->state.ELFW(elf,LIBELFBITS).phdr = NULL;
199 = elf->state.ELFW(elf,LIBELFBITS).phdr;
222 result = elf->state.ELFW(elf,LIBELFBITS).phdr;
230 elfw2(LIBELFBITS,getphdr) (elf)
231 Elf *elf;
235 if (elf == NULL)
238 if (unlikely (elf->kind != ELF_K_ELF))
247 result = elf->state.ELFW(elf,LIBELFBITS).phdr;
251 rwlock_wrlock (elf->lock);
252 result = __elfw2(LIBELFBITS,getphdr_wrlock) (elf);
253 rwlock_unlock (elf->lock);