Lines Matching defs:elfhdr
55 #define elfhdr ex.Elfhdr
224 i = xread(fd, (char *)&elfhdr, sizeof (Elf64_Ehdr));
232 if (*(int *)&elfhdr.e_ident == *(int *)(ELFMAG)) {
234 int is64 = (elfhdr.e_ident[EI_CLASS] ==
239 *(int *)&elfhdr.e_ident[0],
240 *(int *)&elfhdr.e_ident[4],
241 *(int *)&elfhdr.e_ident[8],
242 *(int *)&elfhdr.e_ident[12]);
243 dprintf("e_machine\t0x%x\n", elfhdr.e_machine);
247 (u_longlong_t)elfhdr.e_entry));
250 (u_longlong_t)elfhdr.e_shoff));
252 elfhdr64.e_shentsize : elfhdr.e_shentsize));
254 elfhdr64.e_shnum : elfhdr.e_shnum));
256 elfhdr64.e_shstrndx : elfhdr.e_shstrndx));
262 elfhdr.e_ident[EI_CLASS], ELFCLASS32, ELFCLASS64);
264 if (elfhdr.e_ident[EI_CLASS] == ELFCLASS64) {
266 if (elfhdr.e_machine != EM_AMD64) {
269 "= %d).\n", elfhdr.e_machine);
284 amd64_elf64 = (elfhdr.e_ident[EI_CLASS] ==
289 (Elf64_Ehdr *)&elfhdr);
305 return (read_elf32(fd, print, &elfhdr));