Lines Matching refs:elf

54   Elf *elf = scn->elf;  in ElfW2()  local
55 ElfW2(LIBELFBITS,Ehdr) *ehdr = elf->state.ELFW(elf,LIBELFBITS).ehdr; in ElfW2()
63 if (__elf_getshdrnum_rdlock (elf, &shnum) != 0 in ElfW2()
70 ElfW2(LIBELFBITS,Shdr) *shdr = elf->state.ELFW(elf,LIBELFBITS).shdr = in ElfW2()
72 if (elf->state.ELFW(elf,LIBELFBITS).shdr == NULL) in ElfW2()
77 elf->state.ELFW(elf,LIBELFBITS).shdr_malloced = 1; in ElfW2()
79 if (elf->map_address != NULL) in ElfW2()
83 if (unlikely (ehdr->e_shoff >= elf->maximum_size) in ElfW2()
84 || unlikely (elf->maximum_size - ehdr->e_shoff < size)) in ElfW2()
97 void *file_shdr = ((char *) elf->map_address in ElfW2()
98 + elf->start_offset + ehdr->e_shoff); in ElfW2()
100 assert ((elf->flags & ELF_F_MALLOCED) in ElfW2()
102 || elf->cmd == ELF_C_READ_MMAP in ElfW2()
110 assert ((elf->flags & ELF_F_MALLOCED) in ElfW2()
111 || elf->cmd == ELF_C_READ_MMAP in ElfW2()
123 ((char *) elf->map_address in ElfW2()
124 + elf->start_offset + ehdr->e_shoff); in ElfW2()
133 memcpy (notcvt, ((char *) elf->map_address in ElfW2()
134 + elf->start_offset + ehdr->e_shoff), in ElfW2()
157 elf->state.ELFW(elf,LIBELFBITS).scns.data[shdr[cnt].sh_link].shndx_index in ElfW2()
162 if (elf->state.ELFW(elf,LIBELFBITS).scns.data[cnt].shndx_index == 0) in ElfW2()
163 elf->state.ELFW(elf,LIBELFBITS).scns.data[cnt].shndx_index in ElfW2()
171 else if (likely (elf->fildes != -1)) in ElfW2()
174 ssize_t n = pread_retry (elf->fildes, in ElfW2()
175 elf->state.ELFW(elf,LIBELFBITS).shdr, size, in ElfW2()
176 elf->start_offset + ehdr->e_shoff); in ElfW2()
209 elf->state.ELFW(elf,LIBELFBITS).shdr = NULL; in ElfW2()
210 elf->state.ELFW(elf,LIBELFBITS).shdr_malloced = 0; in ElfW2()
217 elf->state.ELFW(elf,LIBELFBITS).scns.data[cnt].shdr.ELFW(e,LIBELFBITS) in ElfW2()
218 = &elf->state.ELFW(elf,LIBELFBITS).shdr[cnt]; in ElfW2()
233 if (unlikely (scn->elf->state.elf.ehdr == NULL)) in scn_valid()
239 if (unlikely (scn->elf->class != ELFW(ELFCLASS,LIBELFBITS))) in scn_valid()
260 rwlock_unlock (scn->elf->lock); in ElfW2()
261 rwlock_wrlock (scn->elf->lock); in ElfW2()
294 rwlock_rdlock (scn->elf->lock); in ElfW2()
296 rwlock_unlock (scn->elf->lock); in ElfW2()