Home | History | Annotate | Download | only in src

Lines Matching refs:ei

52 					   struct elf_image *ei,
59 elf_w (valid_object) (struct elf_image *ei)
61 if (ei->size <= EI_VERSION)
64 return (memcmp (ei->image, ELFMAG, SELFMAG) == 0
65 && ((uint8_t *) ei->image)[EI_CLASS] == ELF_CLASS
66 && ((uint8_t *) ei->image)[EI_VERSION] != EV_NONE
67 && ((uint8_t *) ei->image)[EI_VERSION] <= EV_CURRENT);
71 elf_map_image (struct elf_image *ei, const char *path)
86 ei->size = stat.st_size;
87 ei->image = mmap (NULL, ei->size, PROT_READ, MAP_PRIVATE, fd, 0);
89 if (ei->image == MAP_FAILED)
92 if (!elf_w (valid_object) (ei))
94 munmap(ei->image, ei->size);
110 if (map->ei.image == NULL)
112 if (elf_map_image(&map->ei, map->path) < 0)
114 map->ei.image = NULL;