Lines Matching defs:ehdr
28 Elf32_Ehdr *ehdr = (Elf32_Ehdr *)(void *)fw;
36 size < (ehdr->e_shoff + sizeof(Elf32_Shdr)))
39 if (!IS_ELF(*ehdr) ||
40 ehdr->e_ident[EI_VERSION] != EV_CURRENT ||
41 ehdr->e_ident[EI_CLASS] != ELFCLASS32 ||
42 ehdr->e_phentsize != sizeof(Elf32_Phdr) ||
43 ehdr->e_shentsize != sizeof(Elf32_Shdr)) {
48 if (ehdr->e_phnum == 0) {
64 Elf32_Ehdr *ehdr = (Elf32_Ehdr *)(void *)fw;
65 Elf32_Phdr *phdr = (void *)((int8_t *)ehdr + ehdr->e_phoff);
75 for (i = 0; i < ehdr->e_phnum; i++, phdr++) {
109 Elf32_Ehdr *ehdr = (Elf32_Ehdr *)(void *)fw;
113 if (fw + fw_size <= fw || fw + ehdr->e_shoff < fw)
116 shdr = (void *)(fw + ehdr->e_shoff);
118 MUL_OVERFLOW(sizeof(*shdr), ehdr->e_shnum, &shdr_array_sz) ||
120 ehdr->e_shstrndx >= ehdr->e_shnum)
123 name_table_sz = shdr[ehdr->e_shstrndx].sh_size;
124 name_table = (char *)elf_data + shdr[ehdr->e_shstrndx].sh_offset;
128 for (i = 0; i < ehdr->e_shnum; i++, shdr++) {