Lines Matching refs:ehdr
116 Elf32_Ehdr ehdr; in filename__read_build_id() local
119 if (fread(&ehdr, sizeof(ehdr), 1, fp) != 1) in filename__read_build_id()
123 ehdr.e_phoff = bswap_32(ehdr.e_phoff); in filename__read_build_id()
124 ehdr.e_phentsize = bswap_16(ehdr.e_phentsize); in filename__read_build_id()
125 ehdr.e_phnum = bswap_16(ehdr.e_phnum); in filename__read_build_id()
128 buf_size = ehdr.e_phentsize * ehdr.e_phnum; in filename__read_build_id()
133 fseek(fp, ehdr.e_phoff, SEEK_SET); in filename__read_build_id()
137 for (i = 0, phdr = buf; i < ehdr.e_phnum; i++, phdr++) { in filename__read_build_id()
167 Elf64_Ehdr ehdr; in filename__read_build_id() local
170 if (fread(&ehdr, sizeof(ehdr), 1, fp) != 1) in filename__read_build_id()
174 ehdr.e_phoff = bswap_64(ehdr.e_phoff); in filename__read_build_id()
175 ehdr.e_phentsize = bswap_16(ehdr.e_phentsize); in filename__read_build_id()
176 ehdr.e_phnum = bswap_16(ehdr.e_phnum); in filename__read_build_id()
179 buf_size = ehdr.e_phentsize * ehdr.e_phnum; in filename__read_build_id()
184 fseek(fp, ehdr.e_phoff, SEEK_SET); in filename__read_build_id()
188 for (i = 0, phdr = buf; i < ehdr.e_phnum; i++, phdr++) { in filename__read_build_id()
320 Elf64_Ehdr ehdr; in dso__type_fd() local
330 if (readn(fd, &ehdr, sizeof(ehdr)) != sizeof(ehdr)) in dso__type_fd()
333 if (ehdr.e_machine == EM_X86_64) in dso__type_fd()