Lines Matching refs:ehdr
108 void *ehdr; in _libelf_ehdr() local
136 ehdr = (void *) e->e_u.e_elf.e_ehdr.e_ehdr32; in _libelf_ehdr()
138 ehdr = (void *) e->e_u.e_elf.e_ehdr.e_ehdr64; in _libelf_ehdr()
140 if (ehdr != NULL) /* already have a translated ehdr */ in _libelf_ehdr()
141 return (ehdr); in _libelf_ehdr()
154 if ((ehdr = calloc((size_t) 1, msz)) == NULL) { in _libelf_ehdr()
160 e->e_u.e_elf.e_ehdr.e_ehdr32 = ehdr; in _libelf_ehdr()
161 EHDR_INIT(ehdr,32); in _libelf_ehdr()
163 e->e_u.e_elf.e_ehdr.e_ehdr64 = ehdr; in _libelf_ehdr()
164 EHDR_INIT(ehdr,64); in _libelf_ehdr()
171 return (ehdr); in _libelf_ehdr()
175 (*xlator)((unsigned char*) ehdr, msz, e->e_rawfile, (size_t) 1, in _libelf_ehdr()
179 phnum = ((Elf32_Ehdr *) ehdr)->e_phnum; in _libelf_ehdr()
180 shnum = ((Elf32_Ehdr *) ehdr)->e_shnum; in _libelf_ehdr()
181 shoff = ((Elf32_Ehdr *) ehdr)->e_shoff; in _libelf_ehdr()
182 strndx = ((Elf32_Ehdr *) ehdr)->e_shstrndx; in _libelf_ehdr()
184 phnum = ((Elf64_Ehdr *) ehdr)->e_phnum; in _libelf_ehdr()
185 shnum = ((Elf64_Ehdr *) ehdr)->e_shnum; in _libelf_ehdr()
186 shoff = ((Elf64_Ehdr *) ehdr)->e_shoff; in _libelf_ehdr()
187 strndx = ((Elf64_Ehdr *) ehdr)->e_shstrndx; in _libelf_ehdr()
211 return (ehdr); in _libelf_ehdr()