Lines Matching refs:ehdr
238 Elf32_Ehdr *ehdr = mmap_file(fname); in do_file() local
240 ehdr_curr = ehdr; in do_file()
241 switch (ehdr->e_ident[EI_DATA]) { in do_file()
244 ehdr->e_ident[EI_DATA], fname); in do_file()
264 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 in do_file()
265 || r2(&ehdr->e_type) != ET_EXEC in do_file()
266 || ehdr->e_ident[EI_VERSION] != EV_CURRENT) { in do_file()
272 switch (r2(&ehdr->e_machine)) { in do_file()
275 r2(&ehdr->e_machine), fname); in do_file()
292 switch (ehdr->e_ident[EI_CLASS]) { in do_file()
295 ehdr->e_ident[EI_CLASS], fname); in do_file()
299 if (r2(&ehdr->e_ehsize) != sizeof(Elf32_Ehdr) in do_file()
300 || r2(&ehdr->e_shentsize) != sizeof(Elf32_Shdr)) { in do_file()
305 do32(ehdr, fname, custom_sort); in do_file()
308 Elf64_Ehdr *const ghdr = (Elf64_Ehdr *)ehdr; in do_file()