Lines Matching defs:e_ident
96 get_shnum (void *map_address, unsigned char *e_ident, int fildes, off_t offset,
111 bool is32 = e_ident[EI_CLASS] == ELFCLASS32;
114 if (e_ident[EI_DATA] == MY_ELFDATA
116 || (((size_t) e_ident
119 ehdr.p = e_ident;
131 ehdr_mem.e32.e_shnum = ((Elf32_Ehdr *) e_ident)->e_shnum;
132 ehdr_mem.e32.e_shoff = ((Elf32_Ehdr *) e_ident)->e_shoff;
135 memcpy (&ehdr_mem, e_ident, sizeof (Elf32_Ehdr));
137 if (e_ident[EI_DATA] != MY_ELFDATA)
147 ehdr_mem.e64.e_shnum = ((Elf64_Ehdr *) e_ident)->e_shnum;
148 ehdr_mem.e64.e_shoff = ((Elf64_Ehdr *) e_ident)->e_shoff;
151 memcpy (&ehdr_mem, e_ident, sizeof (Elf64_Ehdr));
153 if (e_ident[EI_DATA] != MY_ELFDATA)
172 if (likely (map_address != NULL) && e_ident[EI_DATA] == MY_ELFDATA
197 if (e_ident[EI_DATA] != MY_ELFDATA)
221 if (likely (map_address != NULL) && e_ident[EI_DATA] == MY_ELFDATA
244 if (e_ident[EI_DATA] != MY_ELFDATA)
267 file_read_elf (int fildes, void *map_address, unsigned char *e_ident,
271 if (unlikely ((e_ident[EI_CLASS] != ELFCLASS32
272 && e_ident[EI_CLASS] != ELFCLASS64)
274 || (e_ident[EI_DATA] != ELFDATA2LSB
275 && e_ident[EI_DATA] != ELFDATA2MSB)))
283 size_t scncnt = get_shnum (map_address, e_ident, fildes, offset, maxsize);
308 elf->class = e_ident[EI_CLASS];
310 if (e_ident[EI_CLASS] == ELFCLASS32)
317 if (map_address != NULL && e_ident[EI_DATA] == MY_ELFDATA
365 elf->state.elf32.ehdr = memcpy (&elf->state.elf32.ehdr_mem, e_ident,
368 if (e_ident[EI_DATA] != MY_ELFDATA)
403 if (map_address != NULL && e_ident[EI_DATA] == MY_ELFDATA
451 elf->state.elf64.ehdr = memcpy (&elf->state.elf64.ehdr_mem, e_ident,
454 if (e_ident[EI_DATA] != MY_ELFDATA)
496 unsigned char *e_ident = (unsigned char *) map_address + offset;
499 Elf_Kind kind = determine_kind (e_ident, maxsize);
504 return file_read_elf (fildes, map_address, e_ident, offset, maxsize,