ehdr 188 arch/arm/kernel/module-plts.c int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, ehdr 193 arch/arm/kernel/module-plts.c Elf32_Shdr *s, *sechdrs_end = sechdrs + ehdr->e_shnum; ehdr 219 arch/arm/kernel/module-plts.c Elf32_Rel *rels = (void *)ehdr + s->sh_offset; ehdr 111 arch/arm/kernel/vdso.c static void * __init find_section(Elf32_Ehdr *ehdr, const char *name, ehdr 119 arch/arm/kernel/vdso.c sechdrs = (void *)ehdr + ehdr->e_shoff; ehdr 120 arch/arm/kernel/vdso.c secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset; ehdr 123 arch/arm/kernel/vdso.c for (i = 1; i < ehdr->e_shnum; i++) { ehdr 127 arch/arm/kernel/vdso.c return (void *)ehdr + sechdrs[i].sh_offset; ehdr 167 arch/arm/kernel/vdso.c static void __init patch_vdso(void *ehdr) ehdr 172 arch/arm/kernel/vdso.c .hdr = ehdr, ehdr 255 arch/arm64/kernel/module-plts.c int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, ehdr 268 arch/arm64/kernel/module-plts.c for (i = 0; i < ehdr->e_shnum; i++) { ehdr 290 arch/arm64/kernel/module-plts.c for (i = 0; i < ehdr->e_shnum; i++) { ehdr 291 arch/arm64/kernel/module-plts.c Elf64_Rela *rels = (void *)ehdr + sechdrs[i].sh_offset; ehdr 423 arch/ia64/kernel/module.c module_frob_arch_sections (Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, char *secstrings, ehdr 427 arch/ia64/kernel/module.c Elf64_Shdr *s, *sechdrs_end = sechdrs + ehdr->e_shnum; ehdr 452 arch/ia64/kernel/module.c const Elf64_Rela *rels = (void *)ehdr + s->sh_offset; ehdr 14 arch/mips/boot/tools/relocs.c static Elf_Ehdr ehdr; ehdr 96 arch/mips/boot/tools/relocs.c sec_strtab = secs[ehdr.e_shstrndx].strtab; ehdr 97 arch/mips/boot/tools/relocs.c if (shndx < ehdr.e_shnum) ehdr 112 arch/mips/boot/tools/relocs.c for (i = 0; i < ehdr.e_shnum; i++) ehdr 163 arch/mips/boot/tools/relocs.c if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) ehdr 171 arch/mips/boot/tools/relocs.c if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) ehdr 179 arch/mips/boot/tools/relocs.c if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) ehdr 191 arch/mips/boot/tools/relocs.c if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) ehdr 207 arch/mips/boot/tools/relocs.c if (fread(&ehdr, sizeof(ehdr), 1, fp) != 1) ehdr 210 arch/mips/boot/tools/relocs.c if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0) ehdr 213 arch/mips/boot/tools/relocs.c if (ehdr.e_ident[EI_CLASS] != ELF_CLASS) ehdr 216 arch/mips/boot/tools/relocs.c if ((ehdr.e_ident[EI_DATA] != ELFDATA2LSB) && ehdr 217 arch/mips/boot/tools/relocs.c (ehdr.e_ident[EI_DATA] != ELFDATA2MSB)) ehdr 220 arch/mips/boot/tools/relocs.c if (ehdr.e_ident[EI_VERSION] != EV_CURRENT) ehdr 224 arch/mips/boot/tools/relocs.c ehdr.e_type = elf_half_to_cpu(ehdr.e_type); ehdr 225 arch/mips/boot/tools/relocs.c ehdr.e_machine = elf_half_to_cpu(ehdr.e_machine); ehdr 226 arch/mips/boot/tools/relocs.c ehdr.e_version = elf_word_to_cpu(ehdr.e_version); ehdr 227 arch/mips/boot/tools/relocs.c ehdr.e_entry = elf_addr_to_cpu(ehdr.e_entry); ehdr 228 arch/mips/boot/tools/relocs.c ehdr.e_phoff = elf_off_to_cpu(ehdr.e_phoff); ehdr 229 arch/mips/boot/tools/relocs.c ehdr.e_shoff = elf_off_to_cpu(ehdr.e_shoff); ehdr 230 arch/mips/boot/tools/relocs.c ehdr.e_flags = elf_word_to_cpu(ehdr.e_flags); ehdr 231 arch/mips/boot/tools/relocs.c ehdr.e_ehsize = elf_half_to_cpu(ehdr.e_ehsize); ehdr 232 arch/mips/boot/tools/relocs.c ehdr.e_phentsize = elf_half_to_cpu(ehdr.e_phentsize); ehdr 233 arch/mips/boot/tools/relocs.c ehdr.e_phnum = elf_half_to_cpu(ehdr.e_phnum); ehdr 234 arch/mips/boot/tools/relocs.c ehdr.e_shentsize = elf_half_to_cpu(ehdr.e_shentsize); ehdr 235 arch/mips/boot/tools/relocs.c ehdr.e_shnum = elf_half_to_cpu(ehdr.e_shnum); ehdr 236 arch/mips/boot/tools/relocs.c ehdr.e_shstrndx = elf_half_to_cpu(ehdr.e_shstrndx); ehdr 238 arch/mips/boot/tools/relocs.c if ((ehdr.e_type != ET_EXEC) && (ehdr.e_type != ET_DYN)) ehdr 241 arch/mips/boot/tools/relocs.c if (ehdr.e_machine != ELF_MACHINE) ehdr 244 arch/mips/boot/tools/relocs.c if (ehdr.e_version != EV_CURRENT) ehdr 247 arch/mips/boot/tools/relocs.c if (ehdr.e_ehsize != sizeof(Elf_Ehdr)) ehdr 250 arch/mips/boot/tools/relocs.c if (ehdr.e_phentsize != sizeof(Elf_Phdr)) ehdr 253 arch/mips/boot/tools/relocs.c if (ehdr.e_shentsize != sizeof(Elf_Shdr)) ehdr 256 arch/mips/boot/tools/relocs.c if (ehdr.e_shstrndx >= ehdr.e_shnum) ehdr 265 arch/mips/boot/tools/relocs.c secs = calloc(ehdr.e_shnum, sizeof(struct section)); ehdr 267 arch/mips/boot/tools/relocs.c die("Unable to allocate %d section headers\n", ehdr.e_shnum); ehdr 269 arch/mips/boot/tools/relocs.c if (fseek(fp, ehdr.e_shoff, SEEK_SET) < 0) ehdr 270 arch/mips/boot/tools/relocs.c die("Seek to %d failed: %s\n", ehdr.e_shoff, strerror(errno)); ehdr 272 arch/mips/boot/tools/relocs.c for (i = 0; i < ehdr.e_shnum; i++) { ehdr 278 arch/mips/boot/tools/relocs.c i, ehdr.e_shnum, strerror(errno)); ehdr 289 arch/mips/boot/tools/relocs.c if (sec->shdr.sh_link < ehdr.e_shnum) ehdr 298 arch/mips/boot/tools/relocs.c for (i = 0; i < ehdr.e_shnum; i++) { ehdr 323 arch/mips/boot/tools/relocs.c for (i = 0; i < ehdr.e_shnum; i++) { ehdr 366 arch/mips/boot/tools/relocs.c for (i = 0; i < ehdr.e_shnum; i++) { ehdr 412 arch/mips/boot/tools/relocs.c for (i = 0; i < ehdr.e_shnum; i++) { ehdr 424 arch/mips/boot/tools/relocs.c i, ehdr.e_shnum, strerror(errno)); ehdr 438 arch/mips/boot/tools/relocs.c i, ehdr.e_shnum, strerror(errno)); ehdr 473 arch/mips/boot/tools/relocs.c for (i = 0; i < ehdr.e_shnum; i++) { ehdr 502 arch/mips/include/asm/elf.h extern int arch_elf_pt_proc(void *ehdr, void *phdr, struct file *elf, ehdr 505 arch/mips/include/asm/elf.h extern int arch_check_elf(void *ehdr, bool has_interpreter, void *interp_ehdr, ehdr 81 arch/mips/kernel/elf.c } *ehdr = _ehdr; ehdr 90 arch/mips/kernel/elf.c elf32 = ehdr->e32.e_ident[EI_CLASS] == ELFCLASS32; ehdr 91 arch/mips/kernel/elf.c flags = elf32 ? ehdr->e32.e_flags : ehdr->e64.e_flags; ehdr 140 arch/mips/kernel/elf.c } *ehdr = _ehdr; ehdr 150 arch/mips/kernel/elf.c elf32 = ehdr->e32.e_ident[EI_CLASS] == ELFCLASS32; ehdr 151 arch/mips/kernel/elf.c flags = elf32 ? ehdr->e32.e_flags : ehdr->e64.e_flags; ehdr 113 arch/mips/vdso/genvdso.c const Elf32_Ehdr *ehdr; ehdr 137 arch/mips/vdso/genvdso.c ehdr = addr; ehdr 139 arch/mips/vdso/genvdso.c if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0) { ehdr 145 arch/mips/vdso/genvdso.c elf_class = ehdr->e_ident[EI_CLASS]; ehdr 156 arch/mips/vdso/genvdso.c switch (ehdr->e_ident[EI_DATA]) { ehdr 159 arch/mips/vdso/genvdso.c need_swap = ehdr->e_ident[EI_DATA] != HOST_ORDER; ehdr 167 arch/mips/vdso/genvdso.c if (swap_uint16(ehdr->e_machine) != EM_MIPS) { ehdr 172 arch/mips/vdso/genvdso.c } else if (swap_uint16(ehdr->e_type) != ET_DYN) { ehdr 9 arch/mips/vdso/genvdso.h const ELF(Ehdr) *ehdr = vdso; ehdr 15 arch/mips/vdso/genvdso.h shdrs = vdso + FUNC(swap_uint)(ehdr->e_shoff); ehdr 16 arch/mips/vdso/genvdso.h sh_count = swap_uint16(ehdr->e_shnum); ehdr 17 arch/mips/vdso/genvdso.h sh_entsize = swap_uint16(ehdr->e_shentsize); ehdr 19 arch/mips/vdso/genvdso.h shdr = shdrs + (sh_entsize * swap_uint16(ehdr->e_shstrndx)); ehdr 60 arch/mips/vdso/genvdso.h const ELF(Ehdr) *ehdr = vdso; ehdr 69 arch/mips/vdso/genvdso.h shdrs = vdso + FUNC(swap_uint)(ehdr->e_shoff); ehdr 70 arch/mips/vdso/genvdso.h sh_count = swap_uint16(ehdr->e_shnum); ehdr 71 arch/mips/vdso/genvdso.h sh_entsize = swap_uint16(ehdr->e_shentsize); ehdr 87 arch/mips/vdso/genvdso.h flags = swap_uint32(ehdr->e_flags); ehdr 236 arch/parisc/boot/compressed/misc.c Elf64_Ehdr ehdr; ehdr 239 arch/parisc/boot/compressed/misc.c Elf32_Ehdr ehdr; ehdr 245 arch/parisc/boot/compressed/misc.c memcpy(&ehdr, output, sizeof(ehdr)); ehdr 246 arch/parisc/boot/compressed/misc.c if (ehdr.e_ident[EI_MAG0] != ELFMAG0 || ehdr 247 arch/parisc/boot/compressed/misc.c ehdr.e_ident[EI_MAG1] != ELFMAG1 || ehdr 248 arch/parisc/boot/compressed/misc.c ehdr.e_ident[EI_MAG2] != ELFMAG2 || ehdr 249 arch/parisc/boot/compressed/misc.c ehdr.e_ident[EI_MAG3] != ELFMAG3) { ehdr 258 arch/parisc/boot/compressed/misc.c phdrs = malloc(sizeof(*phdrs) * ehdr.e_phnum); ehdr 262 arch/parisc/boot/compressed/misc.c memcpy(phdrs, output + ehdr.e_phoff, sizeof(*phdrs) * ehdr.e_phnum); ehdr 264 arch/parisc/boot/compressed/misc.c for (i = 0; i < ehdr.e_phnum; i++) { ehdr 23 arch/parisc/kernel/kexec_file.c struct elfhdr ehdr; ehdr 28 arch/parisc/kernel/kexec_file.c ret = kexec_build_elf_info(kernel_buf, kernel_len, &ehdr, &elf_info); ehdr 32 arch/parisc/kernel/kexec_file.c ret = kexec_elf_load(image, &ehdr, &elf_info, &kbuf, &kernel_load_addr); ehdr 36 arch/parisc/kernel/kexec_file.c image->start = __pa(elf_info.ehdr->e_entry); ehdr 37 arch/powerpc/kernel/kexec_elf_64.c struct elfhdr ehdr; ehdr 45 arch/powerpc/kernel/kexec_elf_64.c ret = kexec_build_elf_info(kernel_buf, kernel_len, &ehdr, &elf_info); ehdr 49 arch/powerpc/kernel/kexec_elf_64.c ret = kexec_elf_load(image, &ehdr, &elf_info, &kbuf, &kernel_load_addr); ehdr 232 arch/powerpc/kernel/vdso.c static void * __init find_section32(Elf32_Ehdr *ehdr, const char *secname, ehdr 240 arch/powerpc/kernel/vdso.c sechdrs = (void *)ehdr + ehdr->e_shoff; ehdr 241 arch/powerpc/kernel/vdso.c secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset; ehdr 244 arch/powerpc/kernel/vdso.c for (i = 1; i < ehdr->e_shnum; i++) { ehdr 248 arch/powerpc/kernel/vdso.c return (void *)ehdr + sechdrs[i].sh_offset; ehdr 337 arch/powerpc/kernel/vdso.c static void * __init find_section64(Elf64_Ehdr *ehdr, const char *secname, ehdr 345 arch/powerpc/kernel/vdso.c sechdrs = (void *)ehdr + ehdr->e_shoff; ehdr 346 arch/powerpc/kernel/vdso.c secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset; ehdr 349 arch/powerpc/kernel/vdso.c for (i = 1; i < ehdr->e_shnum; i++) { ehdr 353 arch/powerpc/kernel/vdso.c return (void *)ehdr + sechdrs[i].sh_offset; ehdr 112 arch/powerpc/oprofile/cell/vma_map.c Elf32_Ehdr ehdr; ehdr 128 arch/powerpc/oprofile/cell/vma_map.c if (copy_from_user(&ehdr, spu_elf_start, sizeof (ehdr))) ehdr 131 arch/powerpc/oprofile/cell/vma_map.c if (memcmp(ehdr.e_ident, expected, EI_PAD) != 0) { ehdr 137 arch/powerpc/oprofile/cell/vma_map.c if (ehdr.e_machine != EM_SPU) { ehdr 143 arch/powerpc/oprofile/cell/vma_map.c if (ehdr.e_type != ET_EXEC) { ehdr 149 arch/powerpc/oprofile/cell/vma_map.c phdr_start = spu_elf_start + ehdr.e_phoff; ehdr 150 arch/powerpc/oprofile/cell/vma_map.c shdr_start = spu_elf_start + ehdr.e_shoff; ehdr 153 arch/powerpc/oprofile/cell/vma_map.c for (i = 0; i < ehdr.e_phnum; i++) { ehdr 170 arch/powerpc/oprofile/cell/vma_map.c for (i = 0; i < ehdr.e_shnum; i++) { ehdr 90 arch/riscv/kernel/module-sections.c int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, ehdr 100 arch/riscv/kernel/module-sections.c for (i = 0; i < ehdr->e_shnum; i++) { ehdr 123 arch/riscv/kernel/module-sections.c for (i = 0; i < ehdr->e_shnum; i++) { ehdr 124 arch/riscv/kernel/module-sections.c Elf_Rela *relas = (void *)ehdr + sechdrs[i].sh_offset; ehdr 168 arch/s390/include/asm/elf.h #define arch_check_elf(ehdr, interp, interp_ehdr, state) (0) ehdr 170 arch/s390/include/asm/elf.h #define arch_elf_pt_proc(ehdr, phdr, elf, interp, state) \ ehdr 185 arch/s390/include/asm/elf.h #define arch_elf_pt_proc(ehdr, phdr, elf, interp, state) \ ehdr 512 arch/s390/kernel/crash_dump.c static void *ehdr_init(Elf64_Ehdr *ehdr, int mem_chunk_cnt) ehdr 514 arch/s390/kernel/crash_dump.c memset(ehdr, 0, sizeof(*ehdr)); ehdr 515 arch/s390/kernel/crash_dump.c memcpy(ehdr->e_ident, ELFMAG, SELFMAG); ehdr 516 arch/s390/kernel/crash_dump.c ehdr->e_ident[EI_CLASS] = ELFCLASS64; ehdr 517 arch/s390/kernel/crash_dump.c ehdr->e_ident[EI_DATA] = ELFDATA2MSB; ehdr 518 arch/s390/kernel/crash_dump.c ehdr->e_ident[EI_VERSION] = EV_CURRENT; ehdr 519 arch/s390/kernel/crash_dump.c memset(ehdr->e_ident + EI_PAD, 0, EI_NIDENT - EI_PAD); ehdr 520 arch/s390/kernel/crash_dump.c ehdr->e_type = ET_CORE; ehdr 521 arch/s390/kernel/crash_dump.c ehdr->e_machine = EM_S390; ehdr 522 arch/s390/kernel/crash_dump.c ehdr->e_version = EV_CURRENT; ehdr 523 arch/s390/kernel/crash_dump.c ehdr->e_phoff = sizeof(Elf64_Ehdr); ehdr 524 arch/s390/kernel/crash_dump.c ehdr->e_ehsize = sizeof(Elf64_Ehdr); ehdr 525 arch/s390/kernel/crash_dump.c ehdr->e_phentsize = sizeof(Elf64_Phdr); ehdr 526 arch/s390/kernel/crash_dump.c ehdr->e_phnum = mem_chunk_cnt + 1; ehdr 527 arch/s390/kernel/crash_dump.c return ehdr + 1; ehdr 20 arch/s390/kernel/kexec_elf.c const Elf_Ehdr *ehdr; ehdr 27 arch/s390/kernel/kexec_elf.c ehdr = (Elf_Ehdr *)kernel; ehdr 32 arch/s390/kernel/kexec_elf.c entry = ehdr->e_entry; ehdr 34 arch/s390/kernel/kexec_elf.c phdr = (void *)ehdr + ehdr->e_phoff; ehdr 35 arch/s390/kernel/kexec_elf.c for (i = 0; i < ehdr->e_phnum; i++, phdr++) { ehdr 71 arch/s390/kernel/kexec_elf.c const Elf_Ehdr *ehdr; ehdr 77 arch/s390/kernel/kexec_elf.c ehdr = (Elf_Ehdr *)kernel; ehdr 79 arch/s390/kernel/kexec_elf.c if (ehdr->e_type != ET_EXEC || ehdr 80 arch/s390/kernel/kexec_elf.c ehdr->e_ident[EI_CLASS] != ELFCLASS64 || ehdr 81 arch/s390/kernel/kexec_elf.c !elf_check_arch(ehdr)) ehdr 84 arch/s390/kernel/kexec_elf.c if (!ehdr->e_phnum || ehdr->e_phentsize != sizeof(Elf_Phdr)) ehdr 87 arch/s390/kernel/kexec_elf.c size = ehdr->e_ehsize + ehdr->e_phoff; ehdr 88 arch/s390/kernel/kexec_elf.c size += ehdr->e_phentsize * ehdr->e_phnum; ehdr 92 arch/s390/kernel/kexec_elf.c phdr = (void *)ehdr + ehdr->e_phoff; ehdr 94 arch/s390/kernel/kexec_elf.c for (i = 0; i < ehdr->e_phnum; i++, phdr++) { ehdr 112 arch/s390/kernel/kexec_elf.c const Elf_Ehdr *ehdr; ehdr 117 arch/s390/kernel/kexec_elf.c ehdr = (Elf_Ehdr *)buf; ehdr 124 arch/s390/kernel/kexec_elf.c if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0) ehdr 273 arch/s390/kernel/machine_kexec_file.c relas = (void *)pi->ehdr + relsec->sh_offset; ehdr 281 arch/s390/kernel/machine_kexec_file.c sym = (void *)pi->ehdr + symtab->sh_offset; ehdr 290 arch/s390/kernel/machine_kexec_file.c if (sym->st_shndx >= pi->ehdr->e_shnum && ehdr 273 arch/x86/boot/compressed/misc.c Elf64_Ehdr ehdr; ehdr 276 arch/x86/boot/compressed/misc.c Elf32_Ehdr ehdr; ehdr 282 arch/x86/boot/compressed/misc.c memcpy(&ehdr, output, sizeof(ehdr)); ehdr 283 arch/x86/boot/compressed/misc.c if (ehdr.e_ident[EI_MAG0] != ELFMAG0 || ehdr 284 arch/x86/boot/compressed/misc.c ehdr.e_ident[EI_MAG1] != ELFMAG1 || ehdr 285 arch/x86/boot/compressed/misc.c ehdr.e_ident[EI_MAG2] != ELFMAG2 || ehdr 286 arch/x86/boot/compressed/misc.c ehdr.e_ident[EI_MAG3] != ELFMAG3) { ehdr 293 arch/x86/boot/compressed/misc.c phdrs = malloc(sizeof(*phdrs) * ehdr.e_phnum); ehdr 297 arch/x86/boot/compressed/misc.c memcpy(phdrs, output + ehdr.e_phoff, sizeof(*phdrs) * ehdr.e_phnum); ehdr 299 arch/x86/boot/compressed/misc.c for (i = 0; i < ehdr.e_phnum; i++) { ehdr 249 arch/x86/kernel/crash.c Elf64_Ehdr *ehdr; ehdr 277 arch/x86/kernel/crash.c ehdr = (Elf64_Ehdr *)*addr; ehdr 278 arch/x86/kernel/crash.c phdr = (Elf64_Phdr *)(ehdr + 1); ehdr 279 arch/x86/kernel/crash.c for (i = 0; i < ehdr->e_phnum; phdr++, i++) ehdr 507 arch/x86/kernel/machine_kexec_64.c sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff; ehdr 508 arch/x86/kernel/machine_kexec_64.c strtab = (char *)pi->ehdr + sechdrs[symtabsec->sh_link].sh_offset; ehdr 509 arch/x86/kernel/machine_kexec_64.c shstrtab = (char *)pi->ehdr + sechdrs[pi->ehdr->e_shstrndx].sh_offset; ehdr 511 arch/x86/kernel/machine_kexec_64.c rel = (void *)pi->ehdr + relsec->sh_offset; ehdr 541 arch/x86/kernel/machine_kexec_64.c sym = (void *)pi->ehdr + symtabsec->sh_offset; ehdr 565 arch/x86/kernel/machine_kexec_64.c else if (sym->st_shndx >= pi->ehdr->e_shnum) { ehdr 14 arch/x86/tools/relocs.c static Elf_Ehdr ehdr; ehdr 340 arch/x86/tools/relocs.c if (fread(&ehdr, sizeof(ehdr), 1, fp) != 1) { ehdr 344 arch/x86/tools/relocs.c if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0) { ehdr 347 arch/x86/tools/relocs.c if (ehdr.e_ident[EI_CLASS] != ELF_CLASS) { ehdr 350 arch/x86/tools/relocs.c if (ehdr.e_ident[EI_DATA] != ELFDATA2LSB) { ehdr 353 arch/x86/tools/relocs.c if (ehdr.e_ident[EI_VERSION] != EV_CURRENT) { ehdr 357 arch/x86/tools/relocs.c ehdr.e_type = elf_half_to_cpu(ehdr.e_type); ehdr 358 arch/x86/tools/relocs.c ehdr.e_machine = elf_half_to_cpu(ehdr.e_machine); ehdr 359 arch/x86/tools/relocs.c ehdr.e_version = elf_word_to_cpu(ehdr.e_version); ehdr 360 arch/x86/tools/relocs.c ehdr.e_entry = elf_addr_to_cpu(ehdr.e_entry); ehdr 361 arch/x86/tools/relocs.c ehdr.e_phoff = elf_off_to_cpu(ehdr.e_phoff); ehdr 362 arch/x86/tools/relocs.c ehdr.e_shoff = elf_off_to_cpu(ehdr.e_shoff); ehdr 363 arch/x86/tools/relocs.c ehdr.e_flags = elf_word_to_cpu(ehdr.e_flags); ehdr 364 arch/x86/tools/relocs.c ehdr.e_ehsize = elf_half_to_cpu(ehdr.e_ehsize); ehdr 365 arch/x86/tools/relocs.c ehdr.e_phentsize = elf_half_to_cpu(ehdr.e_phentsize); ehdr 366 arch/x86/tools/relocs.c ehdr.e_phnum = elf_half_to_cpu(ehdr.e_phnum); ehdr 367 arch/x86/tools/relocs.c ehdr.e_shentsize = elf_half_to_cpu(ehdr.e_shentsize); ehdr 368 arch/x86/tools/relocs.c ehdr.e_shnum = elf_half_to_cpu(ehdr.e_shnum); ehdr 369 arch/x86/tools/relocs.c ehdr.e_shstrndx = elf_half_to_cpu(ehdr.e_shstrndx); ehdr 371 arch/x86/tools/relocs.c shnum = ehdr.e_shnum; ehdr 372 arch/x86/tools/relocs.c shstrndx = ehdr.e_shstrndx; ehdr 374 arch/x86/tools/relocs.c if ((ehdr.e_type != ET_EXEC) && (ehdr.e_type != ET_DYN)) ehdr 376 arch/x86/tools/relocs.c if (ehdr.e_machine != ELF_MACHINE) ehdr 378 arch/x86/tools/relocs.c if (ehdr.e_version != EV_CURRENT) ehdr 380 arch/x86/tools/relocs.c if (ehdr.e_ehsize != sizeof(Elf_Ehdr)) ehdr 382 arch/x86/tools/relocs.c if (ehdr.e_phentsize != sizeof(Elf_Phdr)) ehdr 384 arch/x86/tools/relocs.c if (ehdr.e_shentsize != sizeof(Elf_Shdr)) ehdr 391 arch/x86/tools/relocs.c if (fseek(fp, ehdr.e_shoff, SEEK_SET) < 0) ehdr 392 arch/x86/tools/relocs.c die("Seek to %d failed: %s\n", ehdr.e_shoff, strerror(errno)); ehdr 418 arch/x86/tools/relocs.c if (fseek(fp, ehdr.e_shoff, SEEK_SET) < 0) { ehdr 420 arch/x86/tools/relocs.c ehdr.e_shoff, strerror(errno)); ehdr 19 drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/rammap.h u8 ever, u8 ehdr, u8 ecnt, u8 elen, int idx, ehdr 24 drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/rammap.h u8 ever, u8 ehdr, u8 ecnt, u8 elen, int idx, ehdr 147 drivers/gpu/drm/nouveau/nvkm/subdev/bios/rammap.c u8 ever, u8 ehdr, u8 ecnt, u8 elen, int idx, u8 *ver, u8 *hdr) ehdr 150 drivers/gpu/drm/nouveau/nvkm/subdev/bios/rammap.c data = data + ehdr + (idx * elen); ehdr 191 drivers/gpu/drm/nouveau/nvkm/subdev/bios/rammap.c u8 ever, u8 ehdr, u8 ecnt, u8 elen, int idx, ehdr 194 drivers/gpu/drm/nouveau/nvkm/subdev/bios/rammap.c data = nvbios_rammapSe(bios, data, ever, ehdr, ecnt, elen, idx, ver, hdr); ehdr 960 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c struct elf32_hdr *ehdr; ehdr 973 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c ehdr = (struct elf32_hdr *)fw->data; ehdr 976 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c class = ehdr->e_ident[EI_CLASS]; ehdr 982 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB) { ehdr 987 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c if (fw->size < ehdr->e_shoff + sizeof(struct elf32_shdr)) { ehdr 992 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG)) { ehdr 998 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c ehdr = (Elf32_Ehdr *)fw->data; ehdr 999 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c if (ehdr->e_ident[EI_MAG0] != ELFMAG0 || ehdr 1000 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c ehdr->e_ident[EI_MAG1] != ELFMAG1 || ehdr 1001 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c ehdr->e_ident[EI_MAG2] != ELFMAG2 || ehdr 1002 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c ehdr->e_ident[EI_MAG3] != ELFMAG3) { ehdr 1007 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c if (ehdr->e_type != ET_EXEC) { ehdr 1012 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c if (ehdr->e_phoff > fw->size) { ehdr 1079 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c Elf32_Ehdr *ehdr; ehdr 1087 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c ehdr = (Elf32_Ehdr *)fw->data; ehdr 1088 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c phdr = (Elf32_Phdr *)(fw->data + ehdr->e_phoff); ehdr 1091 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c for (i = 0; i < ehdr->e_phnum; i++, phdr++) { ehdr 295 drivers/message/fusion/mptbase.c cfg.cfghdr.ehdr = &hdr; ehdr 6425 drivers/message/fusion/mptbase.c pExtHdr = (ConfigExtendedPageHeader_t *)pCfg->cfghdr.ehdr; ehdr 6499 drivers/message/fusion/mptbase.c pCfg->cfghdr.ehdr->ExtPageLength = ehdr 6501 drivers/message/fusion/mptbase.c pCfg->cfghdr.ehdr->ExtPageType = ehdr 895 drivers/message/fusion/mptbase.h ConfigExtendedPageHeader_t *ehdr; ehdr 1359 drivers/message/fusion/mptsas.c cfg.cfghdr.ehdr = &hdr; ehdr 2020 drivers/message/fusion/mptsas.c cfg.cfghdr.ehdr = &hdr; ehdr 2372 drivers/message/fusion/mptsas.c cfg.cfghdr.ehdr = &hdr; ehdr 2446 drivers/message/fusion/mptsas.c cfg.cfghdr.ehdr = &hdr; ehdr 2449 drivers/message/fusion/mptsas.c cfg.cfghdr.ehdr->PageType = MPI_CONFIG_PAGETYPE_EXTENDED; ehdr 2450 drivers/message/fusion/mptsas.c cfg.cfghdr.ehdr->ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT; ehdr 2451 drivers/message/fusion/mptsas.c cfg.cfghdr.ehdr->PageVersion = MPI_SASIOUNITPAGE1_PAGEVERSION; ehdr 2452 drivers/message/fusion/mptsas.c cfg.cfghdr.ehdr->PageNumber = 1; ehdr 2508 drivers/message/fusion/mptsas.c cfg.cfghdr.ehdr = &hdr; ehdr 2573 drivers/message/fusion/mptsas.c cfg.cfghdr.ehdr = &hdr; ehdr 2655 drivers/message/fusion/mptsas.c cfg.cfghdr.ehdr = &hdr; ehdr 2736 drivers/message/fusion/mptsas.c cfg.cfghdr.ehdr = &hdr; ehdr 1103 drivers/net/ethernet/emulex/benet/be_main.c struct ipv6_opt_hdr *ehdr = ehdr 1107 drivers/net/ethernet/emulex/benet/be_main.c if (ehdr->hdrlen == 0xff) ehdr 64 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c struct ethhdr *ehdr; ehdr 90 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c ehdr = skb_push(skb, ETH_HLEN + 8); ehdr 92 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c ehdr = skb_push(skb, ETH_HLEN + 4); ehdr 94 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c ehdr = skb_push(skb, ETH_HLEN - 6); ehdr 96 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c ehdr = skb_push(skb, ETH_HLEN); ehdr 109 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c eth_zero_addr(ehdr->h_source); ehdr 110 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c eth_zero_addr(ehdr->h_dest); ehdr 112 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c ether_addr_copy(ehdr->h_source, attr->src); ehdr 114 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c ether_addr_copy(ehdr->h_dest, attr->dst); ehdr 117 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c ehdr->h_proto = htons(ETH_P_IP); ehdr 119 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c __be16 *ptr = (__be16 *)ehdr; ehdr 129 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c tag = (void *)ehdr + ETH_HLEN; ehdr 130 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c proto = (void *)ehdr + (2 * ETH_ALEN); ehdr 132 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c tag = (void *)ehdr + ETH_HLEN - 6; ehdr 133 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c proto = (void *)ehdr + ETH_ALEN; ehdr 158 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c (sizeof(*ihdr) + sizeof(*ehdr))); ehdr 176 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c iplen = attr->max_size - sizeof(*ehdr); ehdr 250 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c struct ethhdr *ehdr; ehdr 264 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c ehdr = (struct ethhdr *)skb_mac_header(skb); ehdr 266 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c if (!ether_addr_equal_unaligned(ehdr->h_dest, dst)) ehdr 270 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c if (!ether_addr_equal_unaligned(ehdr->h_source, ehdr->h_dest)) ehdr 273 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c if (!ether_addr_equal_unaligned(ehdr->h_source, src)) ehdr 716 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c struct ethhdr *ehdr; ehdr 718 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c ehdr = (struct ethhdr *)skb_mac_header(skb); ehdr 719 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c if (!ether_addr_equal_unaligned(ehdr->h_source, orig_ndev->dev_addr)) ehdr 721 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c if (ehdr->h_proto != htons(ETH_P_PAUSE)) ehdr 838 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c struct ethhdr *ehdr; ehdr 864 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c ehdr = (struct ethhdr *)skb_mac_header(skb); ehdr 865 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c if (!ether_addr_equal_unaligned(ehdr->h_dest, tpriv->packet->dst)) ehdr 1559 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c struct ethhdr *ehdr; ehdr 1562 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c ehdr = (struct ethhdr *)skb_mac_header(skb); ehdr 1563 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c if (!ether_addr_equal_unaligned(ehdr->h_dest, tpriv->packet->src)) ehdr 6542 drivers/net/ethernet/sun/niu.c static u64 niu_compute_tx_flags(struct sk_buff *skb, struct ethhdr *ehdr, ehdr 6550 drivers/net/ethernet/sun/niu.c eth_proto = be16_to_cpu(ehdr->h_proto); ehdr 6553 drivers/net/ethernet/sun/niu.c struct vlan_ethhdr *vp = (struct vlan_ethhdr *) ehdr; ehdr 6616 drivers/net/ethernet/sun/niu.c struct ethhdr *ehdr; ehdr 6649 drivers/net/ethernet/sun/niu.c ehdr = (struct ethhdr *) skb->data; ehdr 6653 drivers/net/ethernet/sun/niu.c tp->flags = cpu_to_le64(niu_compute_tx_flags(skb, ehdr, align, len)); ehdr 3617 drivers/net/vmxnet3/vmxnet3_drv.c struct ethhdr *ehdr; ehdr 3675 drivers/net/vmxnet3/vmxnet3_drv.c ehdr = (struct ethhdr *)pmConf->filters[i].pattern; ehdr 3676 drivers/net/vmxnet3/vmxnet3_drv.c ehdr->h_proto = htons(ETH_P_ARP); ehdr 990 drivers/net/wireless/quantenna/qtnfmac/qlink.h struct qlink_event ehdr; ehdr 1003 drivers/net/wireless/quantenna/qtnfmac/qlink.h struct qlink_event ehdr; ehdr 1016 drivers/net/wireless/quantenna/qtnfmac/qlink.h struct qlink_event ehdr; ehdr 1029 drivers/net/wireless/quantenna/qtnfmac/qlink.h struct qlink_event ehdr; ehdr 1039 drivers/net/wireless/quantenna/qtnfmac/qlink.h struct qlink_event ehdr; ehdr 1056 drivers/net/wireless/quantenna/qtnfmac/qlink.h struct qlink_event ehdr; ehdr 1079 drivers/net/wireless/quantenna/qtnfmac/qlink.h struct qlink_event ehdr; ehdr 1110 drivers/net/wireless/quantenna/qtnfmac/qlink.h struct qlink_event ehdr; ehdr 1130 drivers/net/wireless/quantenna/qtnfmac/qlink.h struct qlink_event ehdr; ehdr 1146 drivers/net/wireless/quantenna/qtnfmac/qlink.h struct qlink_event ehdr; ehdr 95 drivers/remoteproc/qcom_common.c const struct elf32_hdr *ehdr; ehdr 99 drivers/remoteproc/qcom_common.c ehdr = (struct elf32_hdr *)fw->data; ehdr 100 drivers/remoteproc/qcom_common.c phdrs = (struct elf32_phdr *)(ehdr + 1); ehdr 102 drivers/remoteproc/qcom_common.c for (i = 0; i < ehdr->e_phnum; i++) { ehdr 930 drivers/remoteproc/qcom_q6v5_mss.c struct elf32_hdr *ehdr; ehdr 965 drivers/remoteproc/qcom_q6v5_mss.c ehdr = (struct elf32_hdr *)fw->data; ehdr 966 drivers/remoteproc/qcom_q6v5_mss.c phdrs = (struct elf32_phdr *)(ehdr + 1); ehdr 968 drivers/remoteproc/qcom_q6v5_mss.c for (i = 0; i < ehdr->e_phnum; i++) { ehdr 995 drivers/remoteproc/qcom_q6v5_mss.c for (i = 0; i < ehdr->e_phnum; i++) { ehdr 1187 drivers/remoteproc/qcom_q6v5_mss.c const struct elf32_hdr *ehdr; ehdr 1199 drivers/remoteproc/qcom_q6v5_mss.c ehdr = (struct elf32_hdr *)fw->data; ehdr 1200 drivers/remoteproc/qcom_q6v5_mss.c phdrs = (struct elf32_phdr *)(ehdr + 1); ehdr 1203 drivers/remoteproc/qcom_q6v5_mss.c for (i = 0; i < ehdr->e_phnum; i++) { ehdr 1569 drivers/remoteproc/remoteproc_core.c struct elf32_hdr *ehdr; ehdr 1579 drivers/remoteproc/remoteproc_core.c data_size = sizeof(*ehdr); ehdr 1590 drivers/remoteproc/remoteproc_core.c ehdr = data; ehdr 1592 drivers/remoteproc/remoteproc_core.c memset(ehdr, 0, sizeof(*ehdr)); ehdr 1593 drivers/remoteproc/remoteproc_core.c memcpy(ehdr->e_ident, ELFMAG, SELFMAG); ehdr 1594 drivers/remoteproc/remoteproc_core.c ehdr->e_ident[EI_CLASS] = ELFCLASS32; ehdr 1595 drivers/remoteproc/remoteproc_core.c ehdr->e_ident[EI_DATA] = ELFDATA2LSB; ehdr 1596 drivers/remoteproc/remoteproc_core.c ehdr->e_ident[EI_VERSION] = EV_CURRENT; ehdr 1597 drivers/remoteproc/remoteproc_core.c ehdr->e_ident[EI_OSABI] = ELFOSABI_NONE; ehdr 1598 drivers/remoteproc/remoteproc_core.c ehdr->e_type = ET_CORE; ehdr 1599 drivers/remoteproc/remoteproc_core.c ehdr->e_machine = EM_NONE; ehdr 1600 drivers/remoteproc/remoteproc_core.c ehdr->e_version = EV_CURRENT; ehdr 1601 drivers/remoteproc/remoteproc_core.c ehdr->e_entry = rproc->bootaddr; ehdr 1602 drivers/remoteproc/remoteproc_core.c ehdr->e_phoff = sizeof(*ehdr); ehdr 1603 drivers/remoteproc/remoteproc_core.c ehdr->e_ehsize = sizeof(*ehdr); ehdr 1604 drivers/remoteproc/remoteproc_core.c ehdr->e_phentsize = sizeof(*phdr); ehdr 1605 drivers/remoteproc/remoteproc_core.c ehdr->e_phnum = phnum; ehdr 1607 drivers/remoteproc/remoteproc_core.c phdr = data + ehdr->e_phoff; ehdr 1608 drivers/remoteproc/remoteproc_core.c offset = ehdr->e_phoff + sizeof(*phdr) * ehdr->e_phnum; ehdr 38 drivers/remoteproc/remoteproc_elf_loader.c struct elf32_hdr *ehdr; ehdr 51 drivers/remoteproc/remoteproc_elf_loader.c ehdr = (struct elf32_hdr *)fw->data; ehdr 54 drivers/remoteproc/remoteproc_elf_loader.c class = ehdr->e_ident[EI_CLASS]; ehdr 62 drivers/remoteproc/remoteproc_elf_loader.c if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB) { ehdr 64 drivers/remoteproc/remoteproc_elf_loader.c if (ehdr->e_ident[EI_DATA] != ELFDATA2MSB) { ehdr 70 drivers/remoteproc/remoteproc_elf_loader.c if (fw->size < ehdr->e_shoff + sizeof(struct elf32_shdr)) { ehdr 75 drivers/remoteproc/remoteproc_elf_loader.c if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG)) { ehdr 80 drivers/remoteproc/remoteproc_elf_loader.c if (ehdr->e_phnum == 0) { ehdr 85 drivers/remoteproc/remoteproc_elf_loader.c if (ehdr->e_phoff > fw->size) { ehdr 107 drivers/remoteproc/remoteproc_elf_loader.c struct elf32_hdr *ehdr = (struct elf32_hdr *)fw->data; ehdr 109 drivers/remoteproc/remoteproc_elf_loader.c return ehdr->e_entry; ehdr 140 drivers/remoteproc/remoteproc_elf_loader.c struct elf32_hdr *ehdr; ehdr 145 drivers/remoteproc/remoteproc_elf_loader.c ehdr = (struct elf32_hdr *)elf_data; ehdr 146 drivers/remoteproc/remoteproc_elf_loader.c phdr = (struct elf32_phdr *)(elf_data + ehdr->e_phoff); ehdr 149 drivers/remoteproc/remoteproc_elf_loader.c for (i = 0; i < ehdr->e_phnum; i++, phdr++) { ehdr 204 drivers/remoteproc/remoteproc_elf_loader.c find_table(struct device *dev, struct elf32_hdr *ehdr, size_t fw_size) ehdr 210 drivers/remoteproc/remoteproc_elf_loader.c const u8 *elf_data = (void *)ehdr; ehdr 213 drivers/remoteproc/remoteproc_elf_loader.c shdr = (struct elf32_shdr *)(elf_data + ehdr->e_shoff); ehdr 214 drivers/remoteproc/remoteproc_elf_loader.c name_table = elf_data + shdr[ehdr->e_shstrndx].sh_offset; ehdr 216 drivers/remoteproc/remoteproc_elf_loader.c for (i = 0; i < ehdr->e_shnum; i++, shdr++) { ehdr 273 drivers/remoteproc/remoteproc_elf_loader.c struct elf32_hdr *ehdr; ehdr 280 drivers/remoteproc/remoteproc_elf_loader.c ehdr = (struct elf32_hdr *)elf_data; ehdr 282 drivers/remoteproc/remoteproc_elf_loader.c shdr = find_table(dev, ehdr, fw->size); ehdr 320 drivers/remoteproc/remoteproc_elf_loader.c struct elf32_hdr *ehdr = (struct elf32_hdr *)fw->data; ehdr 323 drivers/remoteproc/remoteproc_elf_loader.c shdr = find_table(&rproc->dev, ehdr, fw->size); ehdr 83 drivers/s390/crypto/zcrypt_error.h struct error_hdr *ehdr = reply->message; ehdr 87 drivers/s390/crypto/zcrypt_error.h switch (ehdr->reply_code) { ehdr 102 drivers/s390/crypto/zcrypt_error.h card, queue, ehdr->reply_code); ehdr 117 drivers/s390/crypto/zcrypt_error.h card, queue, ehdr->reply_code); ehdr 126 drivers/s390/crypto/zcrypt_error.h if (ehdr->type == TYPE86_RSP_CODE) { ehdr 135 drivers/s390/crypto/zcrypt_error.h card, queue, apfs, ehdr->reply_code); ehdr 139 drivers/s390/crypto/zcrypt_error.h card, queue, ehdr->reply_code); ehdr 150 drivers/s390/crypto/zcrypt_error.h card, queue, ehdr->reply_code); ehdr 158 drivers/s390/crypto/zcrypt_error.h card, queue, ehdr->reply_code); ehdr 44 drivers/soc/qcom/mdt_loader.c const struct elf32_hdr *ehdr; ehdr 49 drivers/soc/qcom/mdt_loader.c ehdr = (struct elf32_hdr *)fw->data; ehdr 50 drivers/soc/qcom/mdt_loader.c phdrs = (struct elf32_phdr *)(ehdr + 1); ehdr 52 drivers/soc/qcom/mdt_loader.c for (i = 0; i < ehdr->e_phnum; i++) { ehdr 89 drivers/soc/qcom/mdt_loader.c const struct elf32_hdr *ehdr; ehdr 95 drivers/soc/qcom/mdt_loader.c ehdr = (struct elf32_hdr *)fw->data; ehdr 96 drivers/soc/qcom/mdt_loader.c phdrs = (struct elf32_phdr *)(ehdr + 1); ehdr 98 drivers/soc/qcom/mdt_loader.c if (ehdr->e_phnum < 2) ehdr 136 drivers/soc/qcom/mdt_loader.c const struct elf32_hdr *ehdr; ehdr 154 drivers/soc/qcom/mdt_loader.c ehdr = (struct elf32_hdr *)fw->data; ehdr 155 drivers/soc/qcom/mdt_loader.c phdrs = (struct elf32_phdr *)(ehdr + 1); ehdr 181 drivers/soc/qcom/mdt_loader.c for (i = 0; i < ehdr->e_phnum; i++) { ehdr 220 drivers/soc/qcom/mdt_loader.c for (i = 0; i < ehdr->e_phnum; i++) { ehdr 494 fs/binfmt_elf.c static inline int arch_elf_pt_proc(struct elfhdr *ehdr, ehdr 518 fs/binfmt_elf.c static inline int arch_check_elf(struct elfhdr *ehdr, bool has_interp, ehdr 334 fs/proc/kcore.c struct elfhdr ehdr = { ehdr 356 fs/proc/kcore.c if (copy_to_user(buffer, (char *)&ehdr + *fpos, tsz)) { ehdr 1192 fs/proc/vmcore.c Elf64_Ehdr ehdr; ehdr 1198 fs/proc/vmcore.c rc = elfcorehdr_read((char *)&ehdr, sizeof(Elf64_Ehdr), &addr); ehdr 1203 fs/proc/vmcore.c if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 || ehdr 1204 fs/proc/vmcore.c (ehdr.e_type != ET_CORE) || ehdr 1205 fs/proc/vmcore.c !vmcore_elf64_check_arch(&ehdr) || ehdr 1206 fs/proc/vmcore.c ehdr.e_ident[EI_CLASS] != ELFCLASS64 || ehdr 1207 fs/proc/vmcore.c ehdr.e_ident[EI_VERSION] != EV_CURRENT || ehdr 1208 fs/proc/vmcore.c ehdr.e_version != EV_CURRENT || ehdr 1209 fs/proc/vmcore.c ehdr.e_ehsize != sizeof(Elf64_Ehdr) || ehdr 1210 fs/proc/vmcore.c ehdr.e_phentsize != sizeof(Elf64_Phdr) || ehdr 1211 fs/proc/vmcore.c ehdr.e_phnum == 0) { ehdr 1218 fs/proc/vmcore.c ehdr.e_phnum * sizeof(Elf64_Phdr); ehdr 1248 fs/proc/vmcore.c Elf32_Ehdr ehdr; ehdr 1254 fs/proc/vmcore.c rc = elfcorehdr_read((char *)&ehdr, sizeof(Elf32_Ehdr), &addr); ehdr 1259 fs/proc/vmcore.c if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 || ehdr 1260 fs/proc/vmcore.c (ehdr.e_type != ET_CORE) || ehdr 1261 fs/proc/vmcore.c !vmcore_elf32_check_arch(&ehdr) || ehdr 1262 fs/proc/vmcore.c ehdr.e_ident[EI_CLASS] != ELFCLASS32|| ehdr 1263 fs/proc/vmcore.c ehdr.e_ident[EI_VERSION] != EV_CURRENT || ehdr 1264 fs/proc/vmcore.c ehdr.e_version != EV_CURRENT || ehdr 1265 fs/proc/vmcore.c ehdr.e_ehsize != sizeof(Elf32_Ehdr) || ehdr 1266 fs/proc/vmcore.c ehdr.e_phentsize != sizeof(Elf32_Phdr) || ehdr 1267 fs/proc/vmcore.c ehdr.e_phnum == 0) { ehdr 1273 fs/proc/vmcore.c elfcorebuf_sz_orig = sizeof(Elf32_Ehdr) + ehdr.e_phnum * sizeof(Elf32_Phdr); ehdr 1379 fs/proc/vmcore.c Elf64_Ehdr *ehdr = (Elf64_Ehdr *)elfptr; ehdr 1383 fs/proc/vmcore.c for (i = 0; i < ehdr->e_phnum; i++, phdr++) { ehdr 1399 fs/proc/vmcore.c Elf32_Ehdr *ehdr = (Elf32_Ehdr *)elfptr; ehdr 1403 fs/proc/vmcore.c for (i = 0; i < ehdr->e_phnum; i++, phdr++) { ehdr 106 include/linux/kexec.h const Elf_Ehdr *ehdr; ehdr 229 include/linux/kexec.h const struct elfhdr *ehdr; ehdr 233 include/linux/kexec.h int kexec_build_elf_info(const char *buf, size_t len, struct elfhdr *ehdr, ehdr 236 include/linux/kexec.h int kexec_elf_load(struct kimage *image, struct elfhdr *ehdr, ehdr 5195 include/net/cfg80211.h int ieee80211_data_to_8023_exthdr(struct sk_buff *skb, struct ethhdr *ehdr, ehdr 201 kernel/bpf/stackmap.c Elf32_Ehdr *ehdr = (Elf32_Ehdr *)page_addr; ehdr 206 kernel/bpf/stackmap.c if (ehdr->e_phnum > ehdr 212 kernel/bpf/stackmap.c for (i = 0; i < ehdr->e_phnum; ++i) ehdr 224 kernel/bpf/stackmap.c Elf64_Ehdr *ehdr = (Elf64_Ehdr *)page_addr; ehdr 229 kernel/bpf/stackmap.c if (ehdr->e_phnum > ehdr 235 kernel/bpf/stackmap.c for (i = 0; i < ehdr->e_phnum; ++i) ehdr 247 kernel/bpf/stackmap.c Elf32_Ehdr *ehdr; ehdr 262 kernel/bpf/stackmap.c ehdr = (Elf32_Ehdr *)page_addr; ehdr 265 kernel/bpf/stackmap.c if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0) ehdr 269 kernel/bpf/stackmap.c if (ehdr->e_type != ET_EXEC && ehdr->e_type != ET_DYN) ehdr 272 kernel/bpf/stackmap.c if (ehdr->e_ident[EI_CLASS] == ELFCLASS32) ehdr 274 kernel/bpf/stackmap.c else if (ehdr->e_ident[EI_CLASS] == ELFCLASS64) ehdr 24 kernel/kexec_elf.c static inline bool elf_is_elf_file(const struct elfhdr *ehdr) ehdr 26 kernel/kexec_elf.c return memcmp(ehdr->e_ident, ELFMAG, SELFMAG) == 0; ehdr 29 kernel/kexec_elf.c static uint64_t elf64_to_cpu(const struct elfhdr *ehdr, uint64_t value) ehdr 31 kernel/kexec_elf.c if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB) ehdr 33 kernel/kexec_elf.c else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB) ehdr 39 kernel/kexec_elf.c static uint32_t elf32_to_cpu(const struct elfhdr *ehdr, uint32_t value) ehdr 41 kernel/kexec_elf.c if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB) ehdr 43 kernel/kexec_elf.c else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB) ehdr 49 kernel/kexec_elf.c static uint16_t elf16_to_cpu(const struct elfhdr *ehdr, uint16_t value) ehdr 51 kernel/kexec_elf.c if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB) ehdr 53 kernel/kexec_elf.c else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB) ehdr 63 kernel/kexec_elf.c static bool elf_is_ehdr_sane(const struct elfhdr *ehdr, size_t buf_len) ehdr 65 kernel/kexec_elf.c if (ehdr->e_phnum > 0 && ehdr->e_phentsize != sizeof(struct elf_phdr)) { ehdr 68 kernel/kexec_elf.c } else if (ehdr->e_shnum > 0 && ehdr 69 kernel/kexec_elf.c ehdr->e_shentsize != sizeof(struct elf_shdr)) { ehdr 72 kernel/kexec_elf.c } else if (ehdr->e_ident[EI_VERSION] != EV_CURRENT || ehdr 73 kernel/kexec_elf.c ehdr->e_version != EV_CURRENT) { ehdr 78 kernel/kexec_elf.c if (ehdr->e_phoff > 0 && ehdr->e_phnum > 0) { ehdr 85 kernel/kexec_elf.c phdr_size = sizeof(struct elf_phdr) * ehdr->e_phnum; ehdr 88 kernel/kexec_elf.c if (ehdr->e_phoff + phdr_size < ehdr->e_phoff) { ehdr 91 kernel/kexec_elf.c } else if (ehdr->e_phoff + phdr_size > buf_len) { ehdr 97 kernel/kexec_elf.c if (ehdr->e_shoff > 0 && ehdr->e_shnum > 0) { ehdr 104 kernel/kexec_elf.c shdr_size = sizeof(struct elf_shdr) * ehdr->e_shnum; ehdr 107 kernel/kexec_elf.c if (ehdr->e_shoff + shdr_size < ehdr->e_shoff) { ehdr 110 kernel/kexec_elf.c } else if (ehdr->e_shoff + shdr_size > buf_len) { ehdr 119 kernel/kexec_elf.c static int elf_read_ehdr(const char *buf, size_t len, struct elfhdr *ehdr) ehdr 128 kernel/kexec_elf.c memset(ehdr, 0, sizeof(*ehdr)); ehdr 129 kernel/kexec_elf.c memcpy(ehdr->e_ident, buf, sizeof(ehdr->e_ident)); ehdr 130 kernel/kexec_elf.c if (!elf_is_elf_file(ehdr)) { ehdr 135 kernel/kexec_elf.c if (ehdr->e_ident[EI_CLASS] != ELF_CLASS) { ehdr 138 kernel/kexec_elf.c } else if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB && ehdr 139 kernel/kexec_elf.c ehdr->e_ident[EI_DATA] != ELFDATA2MSB) { ehdr 145 kernel/kexec_elf.c if (elf16_to_cpu(ehdr, buf_ehdr->e_ehsize) != sizeof(*buf_ehdr)) { ehdr 150 kernel/kexec_elf.c ehdr->e_type = elf16_to_cpu(ehdr, buf_ehdr->e_type); ehdr 151 kernel/kexec_elf.c ehdr->e_machine = elf16_to_cpu(ehdr, buf_ehdr->e_machine); ehdr 152 kernel/kexec_elf.c ehdr->e_version = elf32_to_cpu(ehdr, buf_ehdr->e_version); ehdr 153 kernel/kexec_elf.c ehdr->e_flags = elf32_to_cpu(ehdr, buf_ehdr->e_flags); ehdr 154 kernel/kexec_elf.c ehdr->e_phentsize = elf16_to_cpu(ehdr, buf_ehdr->e_phentsize); ehdr 155 kernel/kexec_elf.c ehdr->e_phnum = elf16_to_cpu(ehdr, buf_ehdr->e_phnum); ehdr 156 kernel/kexec_elf.c ehdr->e_shentsize = elf16_to_cpu(ehdr, buf_ehdr->e_shentsize); ehdr 157 kernel/kexec_elf.c ehdr->e_shnum = elf16_to_cpu(ehdr, buf_ehdr->e_shnum); ehdr 158 kernel/kexec_elf.c ehdr->e_shstrndx = elf16_to_cpu(ehdr, buf_ehdr->e_shstrndx); ehdr 160 kernel/kexec_elf.c switch (ehdr->e_ident[EI_CLASS]) { ehdr 162 kernel/kexec_elf.c ehdr->e_entry = elf64_to_cpu(ehdr, buf_ehdr->e_entry); ehdr 163 kernel/kexec_elf.c ehdr->e_phoff = elf64_to_cpu(ehdr, buf_ehdr->e_phoff); ehdr 164 kernel/kexec_elf.c ehdr->e_shoff = elf64_to_cpu(ehdr, buf_ehdr->e_shoff); ehdr 168 kernel/kexec_elf.c ehdr->e_entry = elf32_to_cpu(ehdr, buf_ehdr->e_entry); ehdr 169 kernel/kexec_elf.c ehdr->e_phoff = elf32_to_cpu(ehdr, buf_ehdr->e_phoff); ehdr 170 kernel/kexec_elf.c ehdr->e_shoff = elf32_to_cpu(ehdr, buf_ehdr->e_shoff); ehdr 178 kernel/kexec_elf.c return elf_is_ehdr_sane(ehdr, len) ? 0 : -ENOEXEC; ehdr 208 kernel/kexec_elf.c const struct elfhdr *ehdr = elf_info->ehdr; ehdr 212 kernel/kexec_elf.c pbuf = buf + elf_info->ehdr->e_phoff + (idx * sizeof(*buf_phdr)); ehdr 215 kernel/kexec_elf.c phdr->p_type = elf32_to_cpu(elf_info->ehdr, buf_phdr->p_type); ehdr 216 kernel/kexec_elf.c phdr->p_flags = elf32_to_cpu(elf_info->ehdr, buf_phdr->p_flags); ehdr 218 kernel/kexec_elf.c switch (ehdr->e_ident[EI_CLASS]) { ehdr 220 kernel/kexec_elf.c phdr->p_offset = elf64_to_cpu(ehdr, buf_phdr->p_offset); ehdr 221 kernel/kexec_elf.c phdr->p_paddr = elf64_to_cpu(ehdr, buf_phdr->p_paddr); ehdr 222 kernel/kexec_elf.c phdr->p_vaddr = elf64_to_cpu(ehdr, buf_phdr->p_vaddr); ehdr 223 kernel/kexec_elf.c phdr->p_filesz = elf64_to_cpu(ehdr, buf_phdr->p_filesz); ehdr 224 kernel/kexec_elf.c phdr->p_memsz = elf64_to_cpu(ehdr, buf_phdr->p_memsz); ehdr 225 kernel/kexec_elf.c phdr->p_align = elf64_to_cpu(ehdr, buf_phdr->p_align); ehdr 229 kernel/kexec_elf.c phdr->p_offset = elf32_to_cpu(ehdr, buf_phdr->p_offset); ehdr 230 kernel/kexec_elf.c phdr->p_paddr = elf32_to_cpu(ehdr, buf_phdr->p_paddr); ehdr 231 kernel/kexec_elf.c phdr->p_vaddr = elf32_to_cpu(ehdr, buf_phdr->p_vaddr); ehdr 232 kernel/kexec_elf.c phdr->p_filesz = elf32_to_cpu(ehdr, buf_phdr->p_filesz); ehdr 233 kernel/kexec_elf.c phdr->p_memsz = elf32_to_cpu(ehdr, buf_phdr->p_memsz); ehdr 234 kernel/kexec_elf.c phdr->p_align = elf32_to_cpu(ehdr, buf_phdr->p_align); ehdr 255 kernel/kexec_elf.c const struct elfhdr *ehdr = elf_info->ehdr; ehdr 261 kernel/kexec_elf.c phdr_size = sizeof(struct elf_phdr) * ehdr->e_phnum; ehdr 267 kernel/kexec_elf.c for (i = 0; i < ehdr->e_phnum; i++) { ehdr 297 kernel/kexec_elf.c struct elfhdr *ehdr, ehdr 302 kernel/kexec_elf.c ret = elf_read_ehdr(buf, len, ehdr); ehdr 307 kernel/kexec_elf.c elf_info->ehdr = ehdr; ehdr 308 kernel/kexec_elf.c if (ehdr->e_phoff > 0 && ehdr->e_phnum > 0) { ehdr 327 kernel/kexec_elf.c int kexec_build_elf_info(const char *buf, size_t len, struct elfhdr *ehdr, ehdr 333 kernel/kexec_elf.c ret = elf_read_from_buffer(buf, len, ehdr, elf_info); ehdr 338 kernel/kexec_elf.c if (ehdr->e_type != ET_EXEC && ehdr->e_type != ET_DYN) { ehdr 346 kernel/kexec_elf.c for (i = 0; i < ehdr->e_phnum; i++) { ehdr 367 kernel/kexec_elf.c struct elfhdr ehdr; ehdr 371 kernel/kexec_elf.c ret = kexec_build_elf_info(buf, len, &ehdr, &elf_info); ehdr 377 kernel/kexec_elf.c return elf_check_arch(&ehdr) ? 0 : -ENOEXEC; ehdr 388 kernel/kexec_elf.c int kexec_elf_load(struct kimage *image, struct elfhdr *ehdr, ehdr 398 kernel/kexec_elf.c for (i = 0; i < ehdr->e_phnum; i++) { ehdr 840 kernel/kexec_file.c sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff; ehdr 844 kernel/kexec_file.c for (i = 0; i < pi->ehdr->e_shnum; i++) { ehdr 904 kernel/kexec_file.c sechdrs = vzalloc(array_size(sizeof(Elf_Shdr), pi->ehdr->e_shnum)); ehdr 907 kernel/kexec_file.c memcpy(sechdrs, (void *)pi->ehdr + pi->ehdr->e_shoff, ehdr 908 kernel/kexec_file.c pi->ehdr->e_shnum * sizeof(Elf_Shdr)); ehdr 913 kernel/kexec_file.c kbuf->image->start = pi->ehdr->e_entry; ehdr 915 kernel/kexec_file.c for (i = 0; i < pi->ehdr->e_shnum; i++) { ehdr 932 kernel/kexec_file.c pi->ehdr->e_entry >= sechdrs[i].sh_addr && ehdr 933 kernel/kexec_file.c pi->ehdr->e_entry < (sechdrs[i].sh_addr ehdr 939 kernel/kexec_file.c src = (void *)pi->ehdr + sechdrs[i].sh_offset; ehdr 957 kernel/kexec_file.c sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff; ehdr 959 kernel/kexec_file.c for (i = 0; i < pi->ehdr->e_shnum; i++) { ehdr 976 kernel/kexec_file.c if (relsec->sh_info >= pi->ehdr->e_shnum || ehdr 977 kernel/kexec_file.c relsec->sh_link >= pi->ehdr->e_shnum) ehdr 990 kernel/kexec_file.c if (symtab->sh_link >= pi->ehdr->e_shnum) ehdr 1030 kernel/kexec_file.c pi->ehdr = (const Elf_Ehdr *)kexec_purgatory; ehdr 1065 kernel/kexec_file.c const Elf_Ehdr *ehdr; ehdr 1070 kernel/kexec_file.c if (!pi->ehdr) ehdr 1073 kernel/kexec_file.c ehdr = pi->ehdr; ehdr 1074 kernel/kexec_file.c sechdrs = (void *)ehdr + ehdr->e_shoff; ehdr 1076 kernel/kexec_file.c for (i = 0; i < ehdr->e_shnum; i++) { ehdr 1080 kernel/kexec_file.c if (sechdrs[i].sh_link >= ehdr->e_shnum) ehdr 1083 kernel/kexec_file.c strtab = (void *)ehdr + sechdrs[sechdrs[i].sh_link].sh_offset; ehdr 1084 kernel/kexec_file.c syms = (void *)ehdr + sechdrs[i].sh_offset; ehdr 1095 kernel/kexec_file.c syms[k].st_shndx >= ehdr->e_shnum) { ehdr 1243 kernel/kexec_file.c Elf64_Ehdr *ehdr; ehdr 1271 kernel/kexec_file.c ehdr = (Elf64_Ehdr *)buf; ehdr 1272 kernel/kexec_file.c phdr = (Elf64_Phdr *)(ehdr + 1); ehdr 1273 kernel/kexec_file.c memcpy(ehdr->e_ident, ELFMAG, SELFMAG); ehdr 1274 kernel/kexec_file.c ehdr->e_ident[EI_CLASS] = ELFCLASS64; ehdr 1275 kernel/kexec_file.c ehdr->e_ident[EI_DATA] = ELFDATA2LSB; ehdr 1276 kernel/kexec_file.c ehdr->e_ident[EI_VERSION] = EV_CURRENT; ehdr 1277 kernel/kexec_file.c ehdr->e_ident[EI_OSABI] = ELF_OSABI; ehdr 1278 kernel/kexec_file.c memset(ehdr->e_ident + EI_PAD, 0, EI_NIDENT - EI_PAD); ehdr 1279 kernel/kexec_file.c ehdr->e_type = ET_CORE; ehdr 1280 kernel/kexec_file.c ehdr->e_machine = ELF_ARCH; ehdr 1281 kernel/kexec_file.c ehdr->e_version = EV_CURRENT; ehdr 1282 kernel/kexec_file.c ehdr->e_phoff = sizeof(Elf64_Ehdr); ehdr 1283 kernel/kexec_file.c ehdr->e_ehsize = sizeof(Elf64_Ehdr); ehdr 1284 kernel/kexec_file.c ehdr->e_phentsize = sizeof(Elf64_Phdr); ehdr 1292 kernel/kexec_file.c (ehdr->e_phnum)++; ehdr 1300 kernel/kexec_file.c (ehdr->e_phnum)++; ehdr 1310 kernel/kexec_file.c ehdr->e_phnum++; ehdr 1327 kernel/kexec_file.c ehdr->e_phnum++; ehdr 1331 kernel/kexec_file.c ehdr->e_phnum, phdr->p_offset); ehdr 519 net/key/af_key.c const struct sadb_ext *ehdr = (const struct sadb_ext *) p; ehdr 523 net/key/af_key.c if (len < sizeof(*ehdr)) ehdr 526 net/key/af_key.c ext_len = ehdr->sadb_ext_len; ehdr 528 net/key/af_key.c ext_type = ehdr->sadb_ext_type; ehdr 2379 net/mac80211/rx.c struct ethhdr *ehdr; ehdr 2404 net/mac80211/rx.c ehdr = (struct ethhdr *) rx->skb->data; ehdr 2405 net/mac80211/rx.c if (ehdr->h_proto == rx->sdata->control_port_protocol) ehdr 2420 net/mac80211/rx.c struct ethhdr *ehdr = (struct ethhdr *) rx->skb->data; ehdr 2426 net/mac80211/rx.c if (ehdr->h_proto == rx->sdata->control_port_protocol && ehdr 2427 net/mac80211/rx.c (ether_addr_equal(ehdr->h_dest, rx->sdata->vif.addr) || ehdr 2428 net/mac80211/rx.c ether_addr_equal(ehdr->h_dest, pae_group_addr))) ehdr 2472 net/mac80211/rx.c struct ethhdr *ehdr = (struct ethhdr *) rx->skb->data; ehdr 2495 net/mac80211/rx.c if (is_multicast_ether_addr(ehdr->h_dest) && ehdr 2505 net/mac80211/rx.c } else if (!is_multicast_ether_addr(ehdr->h_dest) && ehdr 2506 net/mac80211/rx.c !ether_addr_equal(ehdr->h_dest, ehdr->h_source)) { ehdr 2507 net/mac80211/rx.c dsta = sta_info_get(sdata, ehdr->h_dest); ehdr 5087 net/mac80211/tx.c struct ethhdr *ehdr; ehdr 5115 net/mac80211/tx.c ehdr = skb_push(skb, sizeof(struct ethhdr)); ehdr 5116 net/mac80211/tx.c memcpy(ehdr->h_dest, dest, ETH_ALEN); ehdr 5117 net/mac80211/tx.c memcpy(ehdr->h_source, sdata->vif.addr, ETH_ALEN); ehdr 5118 net/mac80211/tx.c ehdr->h_proto = proto; ehdr 15910 net/wireless/nl80211.c struct ethhdr *ehdr = eth_hdr(skb); ehdr 15911 net/wireless/nl80211.c const u8 *addr = ehdr->h_source; ehdr 450 net/wireless/util.c int ieee80211_data_to_8023_exthdr(struct sk_buff *skb, struct ethhdr *ehdr, ehdr 552 net/wireless/util.c if (!ehdr) ehdr 553 net/wireless/util.c ehdr = skb_push(skb, sizeof(struct ethhdr)); ehdr 554 net/wireless/util.c memcpy(ehdr, &tmp, sizeof(tmp)); ehdr 3316 net/xfrm/xfrm_policy.c __be32 *ehdr; ehdr 3319 net/xfrm/xfrm_policy.c ehdr = (__be32 *)xprth; ehdr 3321 net/xfrm/xfrm_policy.c fl4->fl4_ipsec_spi = ehdr[0]; ehdr 316 samples/bpf/bpf_load.c static int get_sec(Elf *elf, int i, GElf_Ehdr *ehdr, char **shname, ehdr 328 samples/bpf/bpf_load.c *shname = elf_strptr(elf, ehdr->e_shstrndx, shdr->sh_name); ehdr 512 samples/bpf/bpf_load.c GElf_Ehdr ehdr; ehdr 535 samples/bpf/bpf_load.c if (gelf_getehdr(elf, &ehdr) != &ehdr) ehdr 542 samples/bpf/bpf_load.c for (i = 1; i < ehdr.e_shnum; i++) { ehdr 544 samples/bpf/bpf_load.c if (get_sec(elf, i, &ehdr, &shname, &shdr, &data)) ehdr 599 samples/bpf/bpf_load.c for (i = 1; i < ehdr.e_shnum; i++) { ehdr 603 samples/bpf/bpf_load.c if (get_sec(elf, i, &ehdr, &shname, &shdr, &data)) ehdr 610 samples/bpf/bpf_load.c if (get_sec(elf, shdr.sh_info, &ehdr, &shname_prog, ehdr 628 samples/bpf/bpf_load.c for (i = 1; i < ehdr.e_shnum; i++) { ehdr 633 samples/bpf/bpf_load.c if (get_sec(elf, i, &ehdr, &shname, &shdr, &data)) ehdr 172 samples/bpf/test_lwt_bpf.c struct ethhdr ehdr; ehdr 179 samples/bpf/test_lwt_bpf.c ehdr.h_proto = __constant_htons(ETH_P_IP); ehdr 180 samples/bpf/test_lwt_bpf.c memcpy(&ehdr.h_source, &smac, 6); ehdr 181 samples/bpf/test_lwt_bpf.c memcpy(&ehdr.h_dest, &dmac, 6); ehdr 183 samples/bpf/test_lwt_bpf.c ret = bpf_skb_store_bytes(skb, 0, &ehdr, sizeof(ehdr), 0); ehdr 473 scripts/recordmcount.c Elf32_Ehdr *ehdr; ehdr 476 scripts/recordmcount.c ehdr = mmap_file(fname); ehdr 477 scripts/recordmcount.c if (!ehdr) ehdr 483 scripts/recordmcount.c switch (ehdr->e_ident[EI_DATA]) { ehdr 487 scripts/recordmcount.c ehdr->e_ident[EI_DATA], fname); ehdr 516 scripts/recordmcount.c if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 || ehdr 517 scripts/recordmcount.c w2(ehdr->e_type) != ET_REL || ehdr 518 scripts/recordmcount.c ehdr->e_ident[EI_VERSION] != EV_CURRENT) { ehdr 524 scripts/recordmcount.c switch (w2(ehdr->e_machine)) { ehdr 527 scripts/recordmcount.c w2(ehdr->e_machine), fname); ehdr 568 scripts/recordmcount.c switch (ehdr->e_ident[EI_CLASS]) { ehdr 571 scripts/recordmcount.c ehdr->e_ident[EI_CLASS], fname); ehdr 574 scripts/recordmcount.c if (w2(ehdr->e_ehsize) != sizeof(Elf32_Ehdr) ehdr 575 scripts/recordmcount.c || w2(ehdr->e_shentsize) != sizeof(Elf32_Shdr)) { ehdr 580 scripts/recordmcount.c if (w2(ehdr->e_machine) == EM_MIPS) { ehdr 584 scripts/recordmcount.c if (do32(ehdr, fname, reltype) < 0) ehdr 588 scripts/recordmcount.c Elf64_Ehdr *const ghdr = (Elf64_Ehdr *)ehdr; ehdr 177 scripts/recordmcount.h static int append_func(Elf_Ehdr *const ehdr, ehdr 191 scripts/recordmcount.h unsigned const old_shnum = w2(ehdr->e_shnum); ehdr 192 scripts/recordmcount.h uint_t const old_shoff = _w(ehdr->e_shoff); ehdr 207 scripts/recordmcount.h if (uwrite(old_shstr_sh_offset + (void *)ehdr, old_shstr_sh_size) < 0) ehdr 216 scripts/recordmcount.h if (uwrite(old_shoff + (void *)ehdr, ehdr 257 scripts/recordmcount.h ehdr->e_shoff = _w(new_e_shoff); ehdr 258 scripts/recordmcount.h ehdr->e_shnum = w2(2 + w2(ehdr->e_shnum)); /* {.rel,}__mcount_loc */ ehdr 261 scripts/recordmcount.h if (uwrite(ehdr, sizeof(*ehdr)) < 0) ehdr 289 scripts/recordmcount.h Elf_Ehdr const *const ehdr, ehdr 294 scripts/recordmcount.h Elf_Shdr *const shdr0 = (Elf_Shdr *)(_w(ehdr->e_shoff) ehdr 295 scripts/recordmcount.h + (void *)ehdr); ehdr 300 scripts/recordmcount.h + (void *)ehdr); ehdr 303 scripts/recordmcount.h + (void *)ehdr); ehdr 306 scripts/recordmcount.h + (void *)ehdr); ehdr 320 scripts/recordmcount.h Elf_Ehdr const *const ehdr, ehdr 335 scripts/recordmcount.h get_sym_str_and_relp(relhdr, ehdr, &sym0, &str0, &relp); ehdr 368 scripts/recordmcount.h Elf_Ehdr const *const ehdr, ehdr 371 scripts/recordmcount.h Elf_Shdr *const shdr0 = (Elf_Shdr *)(_w(ehdr->e_shoff) ehdr 372 scripts/recordmcount.h + (void *)ehdr); ehdr 383 scripts/recordmcount.h get_sym_str_and_relp(relhdr, ehdr, &sym0, &str0, &relp); ehdr 393 scripts/recordmcount.h ret = make_nop((void *)ehdr, _w(shdr->sh_offset) + _w(relp->r_offset)); ehdr 412 scripts/recordmcount.h if (ulseek((void *)relp - (void *)ehdr, SEEK_SET) < 0) ehdr 437 scripts/recordmcount.h Elf_Ehdr const *const ehdr) ehdr 440 scripts/recordmcount.h + (void *)ehdr); ehdr 452 scripts/recordmcount.h if (w2(ehdr->e_machine) == EM_ARM ehdr 521 scripts/recordmcount.h static int do_func(Elf_Ehdr *const ehdr, char const *const fname, ehdr 524 scripts/recordmcount.h Elf_Shdr *const shdr0 = (Elf_Shdr *)(_w(ehdr->e_shoff) ehdr 525 scripts/recordmcount.h + (void *)ehdr); ehdr 526 scripts/recordmcount.h unsigned const nhdr = w2(ehdr->e_shnum); ehdr 527 scripts/recordmcount.h Elf_Shdr *const shstr = &shdr0[w2(ehdr->e_shstrndx)]; ehdr 529 scripts/recordmcount.h + (void *)ehdr); ehdr 580 scripts/recordmcount.h ehdr); ehdr 587 scripts/recordmcount.h relhdr, ehdr, recsym, recval, reltype); ehdr 593 scripts/recordmcount.h if (nop_mcount(relhdr, ehdr, txtname) < 0) { ehdr 600 scripts/recordmcount.h result = append_func(ehdr, shstr, mloc0, mlocp, mrel0, mrelp, ehdr 271 scripts/sortextable.c Elf32_Ehdr *ehdr = mmap_file(fname); ehdr 273 scripts/sortextable.c ehdr_curr = ehdr; ehdr 274 scripts/sortextable.c switch (ehdr->e_ident[EI_DATA]) { ehdr 277 scripts/sortextable.c ehdr->e_ident[EI_DATA], fname); ehdr 297 scripts/sortextable.c if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 ehdr 298 scripts/sortextable.c || (r2(&ehdr->e_type) != ET_EXEC && r2(&ehdr->e_type) != ET_DYN) ehdr 299 scripts/sortextable.c || ehdr->e_ident[EI_VERSION] != EV_CURRENT) { ehdr 305 scripts/sortextable.c switch (r2(&ehdr->e_machine)) { ehdr 308 scripts/sortextable.c r2(&ehdr->e_machine), fname); ehdr 332 scripts/sortextable.c switch (ehdr->e_ident[EI_CLASS]) { ehdr 335 scripts/sortextable.c ehdr->e_ident[EI_CLASS], fname); ehdr 339 scripts/sortextable.c if (r2(&ehdr->e_ehsize) != sizeof(Elf32_Ehdr) ehdr 340 scripts/sortextable.c || r2(&ehdr->e_shentsize) != sizeof(Elf32_Shdr)) { ehdr 345 scripts/sortextable.c do32(ehdr, fname, custom_sort); ehdr 348 scripts/sortextable.c Elf64_Ehdr *const ghdr = (Elf64_Ehdr *)ehdr; ehdr 91 scripts/sortextable.h do_func(Elf_Ehdr *ehdr, char const *const fname, table_sort_t custom_sort) ehdr 115 scripts/sortextable.h shdr = (Elf_Shdr *)((char *)ehdr + _r(&ehdr->e_shoff)); ehdr 117 scripts/sortextable.h num_sections = r2(&ehdr->e_shnum); ehdr 121 scripts/sortextable.h secindex_strings = r2(&ehdr->e_shstrndx); ehdr 126 scripts/sortextable.h secstrtab = (const char *)ehdr + _r(&shstrtab_sec->sh_offset); ehdr 136 scripts/sortextable.h relocs = (void *)ehdr + _r(&shdr[i].sh_offset); ehdr 145 scripts/sortextable.h (const char *)ehdr + _r(&shdr[i].sh_offset)); ehdr 155 scripts/sortextable.h symtab = (const Elf_Sym *)((const char *)ehdr + ehdr 161 scripts/sortextable.h strtab = (const char *)ehdr + _r(&strtab_sec->sh_offset); ehdr 163 scripts/sortextable.h extab_image = (void *)ehdr + _r(&extab_sec->sh_offset); ehdr 179 scripts/sortextable.h sym = (void *)ehdr + _r(&symtab_sec->sh_offset); ehdr 198 scripts/sortextable.h sort_done_location = (void *)ehdr + ehdr 205 scripts/sortextable.h (unsigned long)((char *)sort_done_location - (char *)ehdr)); ehdr 371 tools/lib/bpf/btf.c static bool btf_check_endianness(const GElf_Ehdr *ehdr) ehdr 374 tools/lib/bpf/btf.c return ehdr->e_ident[EI_DATA] == ELFDATA2LSB; ehdr 376 tools/lib/bpf/btf.c return ehdr->e_ident[EI_DATA] == ELFDATA2MSB; ehdr 389 tools/lib/bpf/btf.c GElf_Ehdr ehdr; ehdr 410 tools/lib/bpf/btf.c if (!gelf_getehdr(elf, &ehdr)) { ehdr 414 tools/lib/bpf/btf.c if (!btf_check_endianness(&ehdr)) { ehdr 418 tools/lib/bpf/btf.c if (!elf_rawdata(elf_getscn(elf, ehdr.e_shstrndx), NULL)) { ehdr 433 tools/lib/bpf/btf.c name = elf_strptr(elf, ehdr.e_shstrndx, sh.sh_name); ehdr 261 tools/lib/bpf/libbpf.c GElf_Ehdr ehdr; ehdr 595 tools/lib/bpf/libbpf.c if (!gelf_getehdr(obj->efile.elf, &obj->efile.ehdr)) { ehdr 600 tools/lib/bpf/libbpf.c ep = &obj->efile.ehdr; ehdr 619 tools/lib/bpf/libbpf.c if (obj->efile.ehdr.e_ident[EI_DATA] == ELFDATA2LSB) ehdr 622 tools/lib/bpf/libbpf.c if (obj->efile.ehdr.e_ident[EI_DATA] == ELFDATA2MSB) ehdr 675 tools/lib/bpf/libbpf.c const GElf_Ehdr *ep = &obj->efile.ehdr; ehdr 1522 tools/lib/bpf/libbpf.c GElf_Ehdr *ep = &obj->efile.ehdr; ehdr 5260 tools/lib/bpf/libbpf.c struct perf_event_header *ehdr; ehdr 5264 tools/lib/bpf/libbpf.c ehdr = base + (data_tail & (mmap_size - 1)); ehdr 5265 tools/lib/bpf/libbpf.c ehdr_size = ehdr->size; ehdr 5267 tools/lib/bpf/libbpf.c if (((void *)ehdr) + ehdr_size > base + mmap_size) { ehdr 5268 tools/lib/bpf/libbpf.c void *copy_start = ehdr; ehdr 5285 tools/lib/bpf/libbpf.c ehdr = *copy_mem; ehdr 5288 tools/lib/bpf/libbpf.c ret = fn(ehdr, private_data); ehdr 31 tools/objtool/arch/x86/decode.c switch (elf->ehdr.e_machine) { ehdr 37 tools/objtool/arch/x86/decode.c WARN("unexpected ELF machine type %d", elf->ehdr.e_machine); ehdr 440 tools/objtool/elf.c if (!gelf_getehdr(elf->elf, &elf->ehdr)) { ehdr 70 tools/objtool/elf.h GElf_Ehdr ehdr; ehdr 13 tools/perf/arch/arm64/util/sym-handling.c bool elf__needs_adjust_symbols(GElf_Ehdr ehdr) ehdr 15 tools/perf/arch/arm64/util/sym-handling.c return ehdr.e_type == ET_EXEC || ehdr 16 tools/perf/arch/arm64/util/sym-handling.c ehdr.e_type == ET_REL || ehdr 17 tools/perf/arch/arm64/util/sym-handling.c ehdr.e_type == ET_DYN; ehdr 14 tools/perf/arch/powerpc/util/sym-handling.c bool elf__needs_adjust_symbols(GElf_Ehdr ehdr) ehdr 16 tools/perf/arch/powerpc/util/sym-handling.c return ehdr.e_type == ET_EXEC || ehdr 17 tools/perf/arch/powerpc/util/sym-handling.c ehdr.e_type == ET_REL || ehdr 18 tools/perf/arch/powerpc/util/sym-handling.c ehdr.e_type == ET_DYN; ehdr 254 tools/perf/util/genelf.c Elf_Ehdr *ehdr; ehdr 275 tools/perf/util/genelf.c ehdr = elf_newehdr(e); ehdr 276 tools/perf/util/genelf.c if (!ehdr) { ehdr 281 tools/perf/util/genelf.c ehdr->e_ident[EI_DATA] = GEN_ELF_ENDIAN; ehdr 282 tools/perf/util/genelf.c ehdr->e_ident[EI_CLASS] = GEN_ELF_CLASS; ehdr 283 tools/perf/util/genelf.c ehdr->e_machine = GEN_ELF_ARCH; ehdr 284 tools/perf/util/genelf.c ehdr->e_type = ET_DYN; ehdr 285 tools/perf/util/genelf.c ehdr->e_entry = GEN_ELF_TEXT_OFFSET; ehdr 286 tools/perf/util/genelf.c ehdr->e_version = EV_CURRENT; ehdr 287 tools/perf/util/genelf.c ehdr->e_shstrndx= unwinding ? 4 : 2; /* shdr index for section name */ ehdr 261 tools/perf/util/probe-event.c GElf_Ehdr ehdr; ehdr 276 tools/perf/util/probe-event.c if (gelf_getehdr(elf, &ehdr) == NULL) ehdr 279 tools/perf/util/probe-event.c sec = elf_section_by_name(elf, &ehdr, &shdr, ehdr 297 tools/perf/util/probe-event.c if (ehdr.e_ident[EI_CLASS] == ELFCLASS32) ehdr 532 tools/perf/util/probe-event.c GElf_Ehdr ehdr; ehdr 549 tools/perf/util/probe-event.c if (gelf_getehdr(elf, &ehdr) == NULL) ehdr 552 tools/perf/util/probe-event.c if (!elf_section_by_name(elf, &ehdr, &shdr, ".text", NULL)) ehdr 1155 tools/perf/util/probe-finder.c GElf_Ehdr ehdr; ehdr 1165 tools/perf/util/probe-finder.c if (gelf_getehdr(elf, &ehdr) == NULL) ehdr 1168 tools/perf/util/probe-finder.c pf->machine = ehdr.e_machine; ehdr 1174 tools/perf/util/probe-finder.c if (elf_section_by_name(elf, &ehdr, &shdr, ".eh_frame", NULL) && ehdr 78 tools/perf/util/symbol-elf.c GElf_Ehdr *ehdr; ehdr 80 tools/perf/util/symbol-elf.c ehdr = gelf_getehdr(elf, &gehdr); ehdr 81 tools/perf/util/symbol-elf.c if (!ehdr) ehdr 84 tools/perf/util/symbol-elf.c *dst = ehdr->e_phnum; ehdr 292 tools/perf/util/symbol-elf.c GElf_Ehdr ehdr; ehdr 301 tools/perf/util/symbol-elf.c ehdr = ss->ehdr; ehdr 310 tools/perf/util/symbol-elf.c scn_plt_rel = elf_section_by_name(elf, &ehdr, &shdr_rel_plt, ehdr 313 tools/perf/util/symbol-elf.c scn_plt_rel = elf_section_by_name(elf, &ehdr, &shdr_rel_plt, ehdr 324 tools/perf/util/symbol-elf.c if (elf_section_by_name(elf, &ehdr, &shdr_plt, ".plt", NULL) == NULL) ehdr 352 tools/perf/util/symbol-elf.c switch (ehdr.e_machine) { ehdr 457 tools/perf/util/symbol-elf.c GElf_Ehdr ehdr; ehdr 471 tools/perf/util/symbol-elf.c if (gelf_getehdr(elf, &ehdr) == NULL) { ehdr 483 tools/perf/util/symbol-elf.c sec = elf_section_by_name(elf, &ehdr, &shdr, ehdr 488 tools/perf/util/symbol-elf.c sec = elf_section_by_name(elf, &ehdr, &shdr, ehdr 493 tools/perf/util/symbol-elf.c sec = elf_section_by_name(elf, &ehdr, &shdr, ehdr 616 tools/perf/util/symbol-elf.c GElf_Ehdr ehdr; ehdr 636 tools/perf/util/symbol-elf.c if (gelf_getehdr(elf, &ehdr) == NULL) { ehdr 641 tools/perf/util/symbol-elf.c sec = elf_section_by_name(elf, &ehdr, &shdr, ehdr 707 tools/perf/util/symbol-elf.c bool __weak elf__needs_adjust_symbols(GElf_Ehdr ehdr) ehdr 709 tools/perf/util/symbol-elf.c return ehdr.e_type == ET_EXEC || ehdr.e_type == ET_REL; ehdr 715 tools/perf/util/symbol-elf.c GElf_Ehdr ehdr; ehdr 740 tools/perf/util/symbol-elf.c if (gelf_getehdr(elf, &ehdr) == NULL) { ehdr 746 tools/perf/util/symbol-elf.c if (dso__swap_init(dso, ehdr.e_ident[EI_DATA])) { ehdr 769 tools/perf/util/symbol-elf.c ss->symtab = elf_section_by_name(elf, &ehdr, &ss->symshdr, ".symtab", ehdr 775 tools/perf/util/symbol-elf.c ss->dynsym = elf_section_by_name(elf, &ehdr, &ss->dynshdr, ".dynsym", ehdr 781 tools/perf/util/symbol-elf.c ss->opdsec = elf_section_by_name(elf, &ehdr, &ss->opdshdr, ".opd", ehdr 789 tools/perf/util/symbol-elf.c ss->adjust_symbols = elf__needs_adjust_symbols(ehdr); ehdr 799 tools/perf/util/symbol-elf.c ss->ehdr = ehdr; ehdr 960 tools/perf/util/symbol-elf.c GElf_Ehdr ehdr; ehdr 975 tools/perf/util/symbol-elf.c dso->rel = syms_ss->ehdr.e_type == ET_REL; ehdr 998 tools/perf/util/symbol-elf.c ehdr = syms_ss->ehdr; ehdr 1002 tools/perf/util/symbol-elf.c if (elf_section_by_name(runtime_ss->elf, &runtime_ss->ehdr, &tshdr, ehdr 1021 tools/perf/util/symbol-elf.c sec_strndx = elf_getscn(runtime_ss->elf, runtime_ss->ehdr.e_shstrndx); ehdr 1080 tools/perf/util/symbol-elf.c if (ehdr.e_machine == EM_ARM || ehdr.e_machine == EM_AARCH64) { ehdr 1119 tools/perf/util/symbol-elf.c if ((ehdr.e_machine == EM_ARM) && ehdr 1227 tools/perf/util/symbol-elf.c GElf_Ehdr ehdr; ehdr 1244 tools/perf/util/symbol-elf.c if (gelf_getehdr(elf, &ehdr) == NULL) ehdr 1247 tools/perf/util/symbol-elf.c if (ehdr.e_machine == EM_X86_64) ehdr 1302 tools/perf/util/symbol-elf.c GElf_Ehdr ehdr; ehdr 1307 tools/perf/util/symbol-elf.c GElf_Ehdr *ehdr; ehdr 1321 tools/perf/util/symbol-elf.c ehdr = gelf_getehdr(kcore->elf, &kcore->ehdr); ehdr 1322 tools/perf/util/symbol-elf.c if (!ehdr) ehdr 1353 tools/perf/util/symbol-elf.c memset(&kcore->ehdr, 0, sizeof(GElf_Ehdr)); ehdr 1373 tools/perf/util/symbol-elf.c GElf_Ehdr *ehdr = &to->ehdr; ehdr 1374 tools/perf/util/symbol-elf.c GElf_Ehdr *kehdr = &from->ehdr; ehdr 1376 tools/perf/util/symbol-elf.c memcpy(ehdr->e_ident, kehdr->e_ident, EI_NIDENT); ehdr 1377 tools/perf/util/symbol-elf.c ehdr->e_type = kehdr->e_type; ehdr 1378 tools/perf/util/symbol-elf.c ehdr->e_machine = kehdr->e_machine; ehdr 1379 tools/perf/util/symbol-elf.c ehdr->e_version = kehdr->e_version; ehdr 1380 tools/perf/util/symbol-elf.c ehdr->e_entry = 0; ehdr 1381 tools/perf/util/symbol-elf.c ehdr->e_shoff = 0; ehdr 1382 tools/perf/util/symbol-elf.c ehdr->e_flags = kehdr->e_flags; ehdr 1383 tools/perf/util/symbol-elf.c ehdr->e_phnum = count; ehdr 1384 tools/perf/util/symbol-elf.c ehdr->e_shentsize = 0; ehdr 1385 tools/perf/util/symbol-elf.c ehdr->e_shnum = 0; ehdr 1386 tools/perf/util/symbol-elf.c ehdr->e_shstrndx = 0; ehdr 1389 tools/perf/util/symbol-elf.c ehdr->e_phoff = sizeof(Elf32_Ehdr); ehdr 1390 tools/perf/util/symbol-elf.c ehdr->e_ehsize = sizeof(Elf32_Ehdr); ehdr 1391 tools/perf/util/symbol-elf.c ehdr->e_phentsize = sizeof(Elf32_Phdr); ehdr 1393 tools/perf/util/symbol-elf.c ehdr->e_phoff = sizeof(Elf64_Ehdr); ehdr 1394 tools/perf/util/symbol-elf.c ehdr->e_ehsize = sizeof(Elf64_Ehdr); ehdr 1395 tools/perf/util/symbol-elf.c ehdr->e_phentsize = sizeof(Elf64_Phdr); ehdr 1398 tools/perf/util/symbol-elf.c if (!gelf_update_ehdr(to->elf, ehdr)) ehdr 2039 tools/perf/util/symbol-elf.c GElf_Ehdr ehdr; ehdr 2122 tools/perf/util/symbol-elf.c if (!gelf_getehdr(*elf, &ehdr)) { ehdr 2135 tools/perf/util/symbol-elf.c if (elf_section_by_name(*elf, &ehdr, &shdr, SDT_BASE_SCN, NULL)) ehdr 2139 tools/perf/util/symbol-elf.c if (elf_section_by_name(*elf, &ehdr, &shdr, SDT_PROBES_SCN, NULL)) ehdr 2168 tools/perf/util/symbol-elf.c GElf_Ehdr ehdr; ehdr 2177 tools/perf/util/symbol-elf.c if (gelf_getehdr(elf, &ehdr) == NULL) { ehdr 2187 tools/perf/util/symbol-elf.c scn = elf_section_by_name(elf, &ehdr, &shdr, SDT_NOTE_SCN, NULL); ehdr 114 tools/perf/util/symbol-minimal.c Elf32_Ehdr ehdr; ehdr 117 tools/perf/util/symbol-minimal.c if (fread(&ehdr, sizeof(ehdr), 1, fp) != 1) ehdr 121 tools/perf/util/symbol-minimal.c ehdr.e_phoff = bswap_32(ehdr.e_phoff); ehdr 122 tools/perf/util/symbol-minimal.c ehdr.e_phentsize = bswap_16(ehdr.e_phentsize); ehdr 123 tools/perf/util/symbol-minimal.c ehdr.e_phnum = bswap_16(ehdr.e_phnum); ehdr 126 tools/perf/util/symbol-minimal.c buf_size = ehdr.e_phentsize * ehdr.e_phnum; ehdr 131 tools/perf/util/symbol-minimal.c fseek(fp, ehdr.e_phoff, SEEK_SET); ehdr 135 tools/perf/util/symbol-minimal.c for (i = 0, phdr = buf; i < ehdr.e_phnum; i++, phdr++) { ehdr 165 tools/perf/util/symbol-minimal.c Elf64_Ehdr ehdr; ehdr 168 tools/perf/util/symbol-minimal.c if (fread(&ehdr, sizeof(ehdr), 1, fp) != 1) ehdr 172 tools/perf/util/symbol-minimal.c ehdr.e_phoff = bswap_64(ehdr.e_phoff); ehdr 173 tools/perf/util/symbol-minimal.c ehdr.e_phentsize = bswap_16(ehdr.e_phentsize); ehdr 174 tools/perf/util/symbol-minimal.c ehdr.e_phnum = bswap_16(ehdr.e_phnum); ehdr 177 tools/perf/util/symbol-minimal.c buf_size = ehdr.e_phentsize * ehdr.e_phnum; ehdr 182 tools/perf/util/symbol-minimal.c fseek(fp, ehdr.e_phoff, SEEK_SET); ehdr 186 tools/perf/util/symbol-minimal.c for (i = 0, phdr = buf; i < ehdr.e_phnum; i++, phdr++) { ehdr 318 tools/perf/util/symbol-minimal.c Elf64_Ehdr ehdr; ehdr 328 tools/perf/util/symbol-minimal.c if (readn(fd, &ehdr, sizeof(ehdr)) != sizeof(ehdr)) ehdr 331 tools/perf/util/symbol-minimal.c if (ehdr.e_machine == EM_X86_64) ehdr 228 tools/perf/util/symbol.h bool elf__needs_adjust_symbols(GElf_Ehdr ehdr); ehdr 22 tools/perf/util/symsrc.h GElf_Ehdr ehdr; ehdr 174 tools/perf/util/unwind-libunwind-local.c GElf_Ehdr ehdr; ehdr 183 tools/perf/util/unwind-libunwind-local.c if (gelf_getehdr(elf, &ehdr) == NULL) ehdr 186 tools/perf/util/unwind-libunwind-local.c if (!elf_section_by_name(elf, &ehdr, &shdr, name, NULL)) ehdr 200 tools/perf/util/unwind-libunwind-local.c GElf_Ehdr ehdr; ehdr 206 tools/perf/util/unwind-libunwind-local.c if (gelf_getehdr(elf, &ehdr) == NULL) ehdr 209 tools/perf/util/unwind-libunwind-local.c retval = (ehdr.e_type == ET_EXEC); ehdr 195 tools/testing/selftests/powerpc/ptrace/core-pkey.c static int check_core_file(struct shared_info *info, Elf64_Ehdr *ehdr, ehdr 202 tools/testing/selftests/powerpc/ptrace/core-pkey.c void *p = ehdr, *note; ehdr 205 tools/testing/selftests/powerpc/ptrace/core-pkey.c ret = memcmp(ehdr->e_ident, ELFMAG, SELFMAG); ehdr 208 tools/testing/selftests/powerpc/ptrace/core-pkey.c FAIL_IF(ehdr->e_type != ET_CORE); ehdr 209 tools/testing/selftests/powerpc/ptrace/core-pkey.c FAIL_IF(ehdr->e_machine != EM_PPC64); ehdr 210 tools/testing/selftests/powerpc/ptrace/core-pkey.c FAIL_IF(ehdr->e_phoff == 0 || ehdr->e_phnum == 0); ehdr 216 tools/testing/selftests/powerpc/ptrace/core-pkey.c phdr_size = sizeof(*phdr) * ehdr->e_phnum; ehdr 219 tools/testing/selftests/powerpc/ptrace/core-pkey.c FAIL_IF(ehdr->e_phoff + phdr_size < ehdr->e_phoff); ehdr 220 tools/testing/selftests/powerpc/ptrace/core-pkey.c FAIL_IF(ehdr->e_phoff + phdr_size > core_size); ehdr 223 tools/testing/selftests/powerpc/ptrace/core-pkey.c for (phdr = p + ehdr->e_phoff; ehdr 224 tools/testing/selftests/powerpc/ptrace/core-pkey.c (void *) phdr < p + ehdr->e_phoff + phdr_size; ehdr 225 tools/testing/selftests/powerpc/ptrace/core-pkey.c phdr += ehdr->e_phentsize) ehdr 229 tools/testing/selftests/powerpc/ptrace/core-pkey.c FAIL_IF((void *) phdr >= p + ehdr->e_phoff + phdr_size);