Lines Matching refs:ehdr
514 Elf32_Ehdr *ehdr; in do_file() local
517 ehdr = mmap_file(fname); in do_file()
518 if (!ehdr) in do_file()
524 switch (ehdr->e_ident[EI_DATA]) { in do_file()
528 ehdr->e_ident[EI_DATA], fname); in do_file()
557 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 || in do_file()
558 w2(ehdr->e_type) != ET_REL || in do_file()
559 ehdr->e_ident[EI_VERSION] != EV_CURRENT) { in do_file()
565 switch (w2(ehdr->e_machine)) { in do_file()
568 w2(ehdr->e_machine), fname); in do_file()
610 switch (ehdr->e_ident[EI_CLASS]) { in do_file()
613 ehdr->e_ident[EI_CLASS], fname); in do_file()
616 if (w2(ehdr->e_ehsize) != sizeof(Elf32_Ehdr) in do_file()
617 || w2(ehdr->e_shentsize) != sizeof(Elf32_Shdr)) { in do_file()
622 if (w2(ehdr->e_machine) == EM_MIPS) { in do_file()
626 if (w2(ehdr->e_machine) == EM_LOONGARCH) { in do_file()
630 if (do32(ehdr, fname, reltype) < 0) in do_file()
634 Elf64_Ehdr *const ghdr = (Elf64_Ehdr *)ehdr; in do_file()