Lines Matching refs:ehdr

23 	const struct elf32_hdr *ehdr;  in mdt_header_valid()  local
27 if (fw->size < sizeof(*ehdr)) in mdt_header_valid()
30 ehdr = (struct elf32_hdr *)fw->data; in mdt_header_valid()
32 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG)) in mdt_header_valid()
35 if (ehdr->e_phentsize != sizeof(struct elf32_phdr)) in mdt_header_valid()
38 phend = size_add(size_mul(sizeof(struct elf32_phdr), ehdr->e_phnum), ehdr->e_phoff); in mdt_header_valid()
42 if (ehdr->e_shentsize != sizeof(struct elf32_shdr)) in mdt_header_valid()
45 shend = size_add(size_mul(sizeof(struct elf32_shdr), ehdr->e_shnum), ehdr->e_shoff); in mdt_header_valid()
111 const struct elf32_hdr *ehdr; in qcom_mdt_get_size() local
119 ehdr = (struct elf32_hdr *)fw->data; in qcom_mdt_get_size()
120 phdrs = (struct elf32_phdr *)(fw->data + ehdr->e_phoff); in qcom_mdt_get_size()
122 for (i = 0; i < ehdr->e_phnum; i++) { in qcom_mdt_get_size()
162 const struct elf32_hdr *ehdr; in qcom_mdt_read_metadata() local
174 ehdr = (struct elf32_hdr *)fw->data; in qcom_mdt_read_metadata()
175 phdrs = (struct elf32_phdr *)(fw->data + ehdr->e_phoff); in qcom_mdt_read_metadata()
177 if (ehdr->e_phnum < 2) in qcom_mdt_read_metadata()
183 for (i = 1; i < ehdr->e_phnum; i++) { in qcom_mdt_read_metadata()
245 const struct elf32_hdr *ehdr; in qcom_mdt_pas_init() local
257 ehdr = (struct elf32_hdr *)fw->data; in qcom_mdt_pas_init()
258 phdrs = (struct elf32_phdr *)(fw->data + ehdr->e_phoff); in qcom_mdt_pas_init()
260 for (i = 0; i < ehdr->e_phnum; i++) { in qcom_mdt_pas_init()
308 const struct elf32_hdr *ehdr; in qcom_mdt_bins_are_split() local
312 ehdr = (struct elf32_hdr *)fw->data; in qcom_mdt_bins_are_split()
313 phdrs = (struct elf32_phdr *)(fw->data + ehdr->e_phoff); in qcom_mdt_bins_are_split()
315 for (i = 0; i < ehdr->e_phnum; i++) { in qcom_mdt_bins_are_split()
340 const struct elf32_hdr *ehdr; in __qcom_mdt_load() local
357 ehdr = (struct elf32_hdr *)fw->data; in __qcom_mdt_load()
358 phdrs = (struct elf32_phdr *)(fw->data + ehdr->e_phoff); in __qcom_mdt_load()
360 for (i = 0; i < ehdr->e_phnum; i++) { in __qcom_mdt_load()
387 for (i = 0; i < ehdr->e_phnum; i++) { in __qcom_mdt_load()