Lines Matching refs:ehdr

456 		Elf32_Ehdr ehdr;
477 elf_file.ehdr.e_ident[EI_MAG0] = ELFMAG0;
478 elf_file.ehdr.e_ident[EI_MAG1] = ELFMAG1;
479 elf_file.ehdr.e_ident[EI_MAG2] = ELFMAG2;
480 elf_file.ehdr.e_ident[EI_MAG3] = ELFMAG3;
481 elf_file.ehdr.e_ident[EI_VERSION] = EV_CURRENT;
482 elf_file.ehdr.e_ident[EI_CLASS] = ELFCLASS32;
484 elf_file.ehdr.e_ident[EI_DATA] = ELFDATA2MSB;
486 elf_file.ehdr.e_ident[EI_DATA] = ELFDATA2LSB;
488 elf_file.ehdr.e_type = ET_REL;
490 elf_file.ehdr.e_machine = EM_SPARC;
492 elf_file.ehdr.e_machine = EM_386;
494 elf_file.ehdr.e_version = EV_CURRENT;
495 elf_file.ehdr.e_shoff = sizeof (Elf32_Ehdr);
496 elf_file.ehdr.e_ehsize = sizeof (Elf32_Ehdr);
497 elf_file.ehdr.e_phentsize = sizeof (Elf32_Phdr);
498 elf_file.ehdr.e_shentsize = sizeof (Elf32_Shdr);
499 elf_file.ehdr.e_shnum = nshdr;
500 elf_file.ehdr.e_shstrndx = ESHDR_SHSTRTAB;
593 Elf64_Ehdr ehdr;
614 elf_file.ehdr.e_ident[EI_MAG0] = ELFMAG0;
615 elf_file.ehdr.e_ident[EI_MAG1] = ELFMAG1;
616 elf_file.ehdr.e_ident[EI_MAG2] = ELFMAG2;
617 elf_file.ehdr.e_ident[EI_MAG3] = ELFMAG3;
618 elf_file.ehdr.e_ident[EI_VERSION] = EV_CURRENT;
619 elf_file.ehdr.e_ident[EI_CLASS] = ELFCLASS64;
621 elf_file.ehdr.e_ident[EI_DATA] = ELFDATA2MSB;
623 elf_file.ehdr.e_ident[EI_DATA] = ELFDATA2LSB;
625 elf_file.ehdr.e_type = ET_REL;
627 elf_file.ehdr.e_machine = EM_SPARCV9;
629 elf_file.ehdr.e_machine = EM_AMD64;
631 elf_file.ehdr.e_version = EV_CURRENT;
632 elf_file.ehdr.e_shoff = sizeof (Elf64_Ehdr);
633 elf_file.ehdr.e_ehsize = sizeof (Elf64_Ehdr);
634 elf_file.ehdr.e_phentsize = sizeof (Elf64_Phdr);
635 elf_file.ehdr.e_shentsize = sizeof (Elf64_Shdr);
636 elf_file.ehdr.e_shnum = nshdr;
637 elf_file.ehdr.e_shstrndx = ESHDR_SHSTRTAB;
1018 GElf_Ehdr ehdr;
1056 if (gelf_getehdr(elf, &ehdr) == NULL) {
1080 if (ehdr.e_ident[EI_CLASS] != eclass) {
1085 if (ehdr.e_machine != emachine1 && ehdr.e_machine != emachine2) {