Lines Matching defs:ehdr
1195 Elf64_Ehdr ehdr;
1201 rc = elfcorehdr_read((char *)&ehdr, sizeof(Elf64_Ehdr), &addr);
1206 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 ||
1207 (ehdr.e_type != ET_CORE) ||
1208 !vmcore_elf64_check_arch(&ehdr) ||
1209 ehdr.e_ident[EI_CLASS] != ELFCLASS64 ||
1210 ehdr.e_ident[EI_VERSION] != EV_CURRENT ||
1211 ehdr.e_version != EV_CURRENT ||
1212 ehdr.e_ehsize != sizeof(Elf64_Ehdr) ||
1213 ehdr.e_phentsize != sizeof(Elf64_Phdr) ||
1214 ehdr.e_phnum == 0) {
1221 ehdr.e_phnum * sizeof(Elf64_Phdr);
1251 Elf32_Ehdr ehdr;
1257 rc = elfcorehdr_read((char *)&ehdr, sizeof(Elf32_Ehdr), &addr);
1262 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 ||
1263 (ehdr.e_type != ET_CORE) ||
1264 !vmcore_elf32_check_arch(&ehdr) ||
1265 ehdr.e_ident[EI_CLASS] != ELFCLASS32||
1266 ehdr.e_ident[EI_VERSION] != EV_CURRENT ||
1267 ehdr.e_version != EV_CURRENT ||
1268 ehdr.e_ehsize != sizeof(Elf32_Ehdr) ||
1269 ehdr.e_phentsize != sizeof(Elf32_Phdr) ||
1270 ehdr.e_phnum == 0) {
1276 elfcorebuf_sz_orig = sizeof(Elf32_Ehdr) + ehdr.e_phnum * sizeof(Elf32_Phdr);
1382 Elf64_Ehdr *ehdr = (Elf64_Ehdr *)elfptr;
1386 for (i = 0; i < ehdr->e_phnum; i++, phdr++) {
1402 Elf32_Ehdr *ehdr = (Elf32_Ehdr *)elfptr;
1406 for (i = 0; i < ehdr->e_phnum; i++, phdr++) {