Lines Matching defs:ehdr
283 Elf64_Ehdr ehdr;
286 Elf32_Ehdr ehdr;
292 memcpy(&ehdr, output, sizeof(ehdr));
293 if (ehdr.e_ident[EI_MAG0] != ELFMAG0 ||
294 ehdr.e_ident[EI_MAG1] != ELFMAG1 ||
295 ehdr.e_ident[EI_MAG2] != ELFMAG2 ||
296 ehdr.e_ident[EI_MAG3] != ELFMAG3)
301 phdrs = malloc(sizeof(*phdrs) * ehdr.e_phnum);
305 memcpy(phdrs, output + ehdr.e_phoff, sizeof(*phdrs) * ehdr.e_phnum);
307 for (i = 0; i < ehdr.e_phnum; i++) {
330 return ehdr.e_entry - LOAD_PHYSICAL_ADDR;