Searched refs:ehdr (Results 1 – 2 of 2) sorted by relevance
24 static inline bool elf_is_elf_file(const struct elfhdr *ehdr) in elf_is_elf_file() argument26 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() argument31 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() argument41 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() argument51 if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB) in elf16_to_cpu()[all …]
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 …]