Home | History | Annotate | Download | only in libelf

Lines Matching refs:elf

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