Home | History | Annotate | Download | only in libelf

Lines Matching full:e_ident

95 get_shnum (void *map_address, unsigned char *e_ident, int fildes, off_t offset,
110 bool is32 = e_ident[EI_CLASS] == ELFCLASS32;
113 if (e_ident[EI_DATA] == MY_ELFDATA
115 || (((size_t) e_ident
118 ehdr.p = e_ident;
130 ehdr_mem.e32.e_shnum = ((Elf32_Ehdr *) e_ident)->e_shnum;
131 ehdr_mem.e32.e_shoff = ((Elf32_Ehdr *) e_ident)->e_shoff;
134 memcpy (&ehdr_mem, e_ident, sizeof (Elf32_Ehdr));
136 if (e_ident[EI_DATA] != MY_ELFDATA)
146 ehdr_mem.e64.e_shnum = ((Elf64_Ehdr *) e_ident)->e_shnum;
147 ehdr_mem.e64.e_shoff = ((Elf64_Ehdr *) e_ident)->e_shoff;
150 memcpy (&ehdr_mem, e_ident, sizeof (Elf64_Ehdr));
152 if (e_ident[EI_DATA] != MY_ELFDATA)
171 if (likely (map_address != NULL) && e_ident[EI_DATA] == MY_ELFDATA
196 if (e_ident[EI_DATA] != MY_ELFDATA)
220 if (likely (map_address != NULL) && e_ident[EI_DATA] == MY_ELFDATA
243 if (e_ident[EI_DATA] != MY_ELFDATA)
266 file_read_elf (int fildes, void *map_address, unsigned char *e_ident,
270 if (unlikely ((e_ident[EI_CLASS] != ELFCLASS32
271 && e_ident[EI_CLASS] != ELFCLASS64)
273 || (e_ident[EI_DATA] != ELFDATA2LSB
274 && e_ident[EI_DATA] != ELFDATA2MSB)))
282 size_t scncnt = get_shnum (map_address, e_ident, fildes, offset, maxsize);
298 elf->class = e_ident[EI_CLASS];
300 if (e_ident[EI_CLASS] == ELFCLASS32)
310 if (map_address != NULL && e_ident[EI_DATA] == MY_ELFDATA
357 elf->state.elf32.ehdr = memcpy (&elf->state.elf32.ehdr_mem, e_ident,
360 if (e_ident[EI_DATA] != MY_ELFDATA)
398 if (map_address != NULL && e_ident[EI_DATA] == MY_ELFDATA
445 elf->state.elf64.ehdr = memcpy (&elf->state.elf64.ehdr_mem, e_ident,
448 if (e_ident[EI_DATA] != MY_ELFDATA)
490 unsigned char *e_ident = (unsigned char *) map_address + offset;
493 Elf_Kind kind = determine_kind (e_ident, maxsize);
498 return file_read_elf (fildes, map_address, e_ident, offset, maxsize,