Lines Matching refs:ehdr
84 } ehdr; in get_shnum() local
98 ehdr.p = e_ident; in get_shnum()
104 ehdr.p = &ehdr_mem; in get_shnum()
143 result = ehdr.e32->e_shnum; in get_shnum()
145 if (unlikely (result == 0) && ehdr.e32->e_shoff != 0) in get_shnum()
147 if (unlikely (ehdr.e32->e_shoff >= maxsize) in get_shnum()
148 || unlikely (maxsize - ehdr.e32->e_shoff < sizeof (Elf32_Shdr))) in get_shnum()
154 || (((size_t) ((char *) map_address + ehdr.e32->e_shoff)) in get_shnum()
157 result = ((Elf32_Shdr *) ((char *) map_address + ehdr.e32->e_shoff in get_shnum()
167 + ehdr.e32->e_shoff in get_shnum()
172 offset + ehdr.e32->e_shoff in get_shnum()
185 if (ehdr.e32->e_shoff > maxsize in get_shnum()
186 || maxsize - ehdr.e32->e_shoff < sizeof (Elf32_Shdr) * result) in get_shnum()
192 result = ehdr.e64->e_shnum; in get_shnum()
194 if (unlikely (result == 0) && ehdr.e64->e_shoff != 0) in get_shnum()
196 if (unlikely (ehdr.e64->e_shoff >= maxsize) in get_shnum()
197 || unlikely (ehdr.e64->e_shoff + sizeof (Elf64_Shdr) > maxsize)) in get_shnum()
204 || (((size_t) ((char *) map_address + ehdr.e64->e_shoff)) in get_shnum()
207 size = ((Elf64_Shdr *) ((char *) map_address + ehdr.e64->e_shoff in get_shnum()
215 + ehdr.e64->e_shoff in get_shnum()
220 offset + ehdr.e64->e_shoff in get_shnum()
237 if (ehdr.e64->e_shoff > maxsize in get_shnum()
238 || maxsize - ehdr.e64->e_shoff < sizeof (Elf64_Shdr) * result) in get_shnum()
304 Elf32_Ehdr *ehdr = (Elf32_Ehdr *) ((char *) map_address + offset); in file_read_elf() local
309 || (((uintptr_t) ehdr) & (__alignof__ (Elf32_Ehdr) - 1)) == 0)) in file_read_elf()
312 elf->state.elf32.ehdr = ehdr; in file_read_elf()
317 elf->state.elf32.ehdr = memcpy (&elf->state.elf32.ehdr_mem, e_ident, in file_read_elf()
341 Elf32_Off e_shoff = elf->state.elf32.ehdr->e_shoff; in file_read_elf()
345 || (((uintptr_t) ((char *) ehdr + e_shoff) in file_read_elf()
358 = (Elf32_Shdr *) ((char *) ehdr + e_shoff); in file_read_elf()
406 Elf64_Ehdr *ehdr = (Elf64_Ehdr *) ((char *) map_address + offset); in file_read_elf() local
411 || (((uintptr_t) ehdr) & (__alignof__ (Elf64_Ehdr) - 1)) == 0)) in file_read_elf()
414 elf->state.elf64.ehdr = ehdr; in file_read_elf()
419 elf->state.elf64.ehdr = memcpy (&elf->state.elf64.ehdr_mem, e_ident, in file_read_elf()
443 Elf64_Off e_shoff = elf->state.elf64.ehdr->e_shoff; in file_read_elf()
447 || (((uintptr_t) ((char *) ehdr + e_shoff) in file_read_elf()
455 = (Elf64_Shdr *) ((char *) ehdr + e_shoff); in file_read_elf()
555 Elf64_Ehdr ehdr; in read_unmmaped_file() member