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 | 840 sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff; in kexec_purgatory_setup_kbuf() 844 for (i = 0; i < pi->ehdr->e_shnum; i++) { in kexec_purgatory_setup_kbuf() 904 sechdrs = vzalloc(array_size(sizeof(Elf_Shdr), pi->ehdr->e_shnum)); in kexec_purgatory_setup_sechdrs() 907 memcpy(sechdrs, (void *)pi->ehdr + pi->ehdr->e_shoff, in kexec_purgatory_setup_sechdrs() 908 pi->ehdr->e_shnum * sizeof(Elf_Shdr)); in kexec_purgatory_setup_sechdrs() 913 kbuf->image->start = pi->ehdr->e_entry; in kexec_purgatory_setup_sechdrs() 915 for (i = 0; i < pi->ehdr->e_shnum; i++) { in kexec_purgatory_setup_sechdrs() 932 pi->ehdr->e_entry >= sechdrs[i].sh_addr && in kexec_purgatory_setup_sechdrs() 933 pi->ehdr->e_entry < (sechdrs[i].sh_addr in kexec_purgatory_setup_sechdrs() 939 src = (void *)pi->ehdr + sechdrs[i].sh_offset; in kexec_purgatory_setup_sechdrs() [all …]
|
/kernel/bpf/ |
D | stackmap.c | 201 Elf32_Ehdr *ehdr = (Elf32_Ehdr *)page_addr; in stack_map_get_build_id_32() local 206 if (ehdr->e_phnum > in stack_map_get_build_id_32() 212 for (i = 0; i < ehdr->e_phnum; ++i) in stack_map_get_build_id_32() 224 Elf64_Ehdr *ehdr = (Elf64_Ehdr *)page_addr; in stack_map_get_build_id_64() local 229 if (ehdr->e_phnum > in stack_map_get_build_id_64() 235 for (i = 0; i < ehdr->e_phnum; ++i) in stack_map_get_build_id_64() 247 Elf32_Ehdr *ehdr; in stack_map_get_build_id() local 262 ehdr = (Elf32_Ehdr *)page_addr; in stack_map_get_build_id() 265 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0) in stack_map_get_build_id() 269 if (ehdr->e_type != ET_EXEC && ehdr->e_type != ET_DYN) in stack_map_get_build_id() [all …]
|