Lines Matching refs:ehdr
34 Loader_CheckHeader(const Elf64_Ehdr *ehdr)
36 if (ehdr->e_ident[EI_MAG0] != ELFMAG0 ||
37 ehdr->e_ident[EI_MAG1] != ELFMAG1 ||
38 ehdr->e_ident[EI_MAG2] != ELFMAG2 ||
39 ehdr->e_ident[EI_MAG3] != ELFMAG3)
42 if (ehdr->e_ident[EI_CLASS] != ELFCLASS64) {
46 if (ehdr->e_machine != EM_AMD64) {
134 const Elf64_Ehdr *ehdr;
138 ehdr = (const Elf64_Ehdr *)(buf);
139 phdr = (const Elf64_Phdr *)(buf + ehdr->e_phoff);
141 if (!Loader_CheckHeader(ehdr)) {
147 for (i = 0; i < ehdr->e_phnum; i++)
174 thr->proc->entrypoint = ehdr->e_entry;