Searched refs:ehdr (Results 1 – 3 of 3) sorted by relevance
/kernel/ |
D | kexec_elf.c | 24 static inline bool elf_is_elf_file(const struct elfhdr *ehdr) in elf_is_elf_file() argument 26 return memcmp(ehdr->e_ident, ELFMAG, SELFMAG) == 0; in elf_is_elf_file() 29 static uint64_t elf64_to_cpu(const struct elfhdr *ehdr, uint64_t value) in elf64_to_cpu() argument 31 if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB) in elf64_to_cpu() 33 else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB) in elf64_to_cpu() 39 static uint32_t elf32_to_cpu(const struct elfhdr *ehdr, uint32_t value) in elf32_to_cpu() argument 41 if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB) in elf32_to_cpu() 43 else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB) in elf32_to_cpu() 49 static uint16_t elf16_to_cpu(const struct elfhdr *ehdr, uint16_t value) in elf16_to_cpu() argument 51 if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB) in elf16_to_cpu() [all …]
|
D | kexec_file.c | 822 sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff; in kexec_purgatory_setup_kbuf() 826 for (i = 0; i < pi->ehdr->e_shnum; i++) { in kexec_purgatory_setup_kbuf() 886 sechdrs = vzalloc(array_size(sizeof(Elf_Shdr), pi->ehdr->e_shnum)); in kexec_purgatory_setup_sechdrs() 889 memcpy(sechdrs, (void *)pi->ehdr + pi->ehdr->e_shoff, in kexec_purgatory_setup_sechdrs() 890 pi->ehdr->e_shnum * sizeof(Elf_Shdr)); in kexec_purgatory_setup_sechdrs() 895 kbuf->image->start = pi->ehdr->e_entry; in kexec_purgatory_setup_sechdrs() 897 for (i = 0; i < pi->ehdr->e_shnum; i++) { in kexec_purgatory_setup_sechdrs() 925 pi->ehdr->e_entry >= sechdrs[i].sh_addr && in kexec_purgatory_setup_sechdrs() 926 pi->ehdr->e_entry < (sechdrs[i].sh_addr in kexec_purgatory_setup_sechdrs() 928 !WARN_ON(kbuf->image->start != pi->ehdr->e_entry)) { in kexec_purgatory_setup_sechdrs() [all …]
|
/kernel/bpf/ |
D | stackmap.c | 208 Elf32_Ehdr *ehdr = (Elf32_Ehdr *)page_addr; in stack_map_get_build_id_32() local 213 if (ehdr->e_phnum > in stack_map_get_build_id_32() 219 for (i = 0; i < ehdr->e_phnum; ++i) { in stack_map_get_build_id_32() 233 Elf64_Ehdr *ehdr = (Elf64_Ehdr *)page_addr; in stack_map_get_build_id_64() local 238 if (ehdr->e_phnum > in stack_map_get_build_id_64() 244 for (i = 0; i < ehdr->e_phnum; ++i) { in stack_map_get_build_id_64() 258 Elf32_Ehdr *ehdr; in stack_map_get_build_id() local 273 ehdr = (Elf32_Ehdr *)page_addr; in stack_map_get_build_id() 276 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0) in stack_map_get_build_id() 280 if (ehdr->e_type != ET_EXEC && ehdr->e_type != ET_DYN) in stack_map_get_build_id() [all …]
|