Lines Matching defs:ehdr
514 Elf32_Ehdr *ehdr;
517 ehdr = mmap_file(fname);
518 if (!ehdr)
524 switch (ehdr->e_ident[EI_DATA]) {
528 ehdr->e_ident[EI_DATA], fname);
557 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 ||
558 w2(ehdr->e_type) != ET_REL ||
559 ehdr->e_ident[EI_VERSION] != EV_CURRENT) {
565 switch (w2(ehdr->e_machine)) {
568 w2(ehdr->e_machine), fname);
611 switch (ehdr->e_ident[EI_CLASS]) {
614 ehdr->e_ident[EI_CLASS], fname);
617 if (w2(ehdr->e_ehsize) != sizeof(Elf32_Ehdr)
618 || w2(ehdr->e_shentsize) != sizeof(Elf32_Shdr)) {
623 if (w2(ehdr->e_machine) == EM_MIPS) {
627 if (w2(ehdr->e_machine) == EM_LOONGARCH) {
631 if (do32(ehdr, fname, reltype) < 0)
635 Elf64_Ehdr *const ghdr = (Elf64_Ehdr *)ehdr;