Lines Matching refs:sechdrs

166 	vfree(pi->sechdrs);  in kimage_file_post_load_cleanup()
167 pi->sechdrs = NULL; in kimage_file_post_load_cleanup()
846 const Elf_Shdr *sechdrs; in kexec_purgatory_setup_kbuf() local
852 sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff; in kexec_purgatory_setup_kbuf()
857 if (!(sechdrs[i].sh_flags & SHF_ALLOC)) in kexec_purgatory_setup_kbuf()
860 align = sechdrs[i].sh_addralign; in kexec_purgatory_setup_kbuf()
861 if (sechdrs[i].sh_type != SHT_NOBITS) { in kexec_purgatory_setup_kbuf()
865 kbuf->bufsz += sechdrs[i].sh_size; in kexec_purgatory_setup_kbuf()
870 bss_sz += sechdrs[i].sh_size; in kexec_purgatory_setup_kbuf()
909 Elf_Shdr *sechdrs; in kexec_purgatory_setup_sechdrs() local
916 sechdrs = vzalloc(array_size(sizeof(Elf_Shdr), pi->ehdr->e_shnum)); in kexec_purgatory_setup_sechdrs()
917 if (!sechdrs) in kexec_purgatory_setup_sechdrs()
919 memcpy(sechdrs, (void *)pi->ehdr + pi->ehdr->e_shoff, in kexec_purgatory_setup_sechdrs()
921 pi->sechdrs = sechdrs; in kexec_purgatory_setup_sechdrs()
931 if (!(sechdrs[i].sh_flags & SHF_ALLOC)) in kexec_purgatory_setup_sechdrs()
934 align = sechdrs[i].sh_addralign; in kexec_purgatory_setup_sechdrs()
935 if (sechdrs[i].sh_type == SHT_NOBITS) { in kexec_purgatory_setup_sechdrs()
937 sechdrs[i].sh_addr = bss_addr; in kexec_purgatory_setup_sechdrs()
938 bss_addr += sechdrs[i].sh_size; in kexec_purgatory_setup_sechdrs()
943 if (sechdrs[i].sh_flags & SHF_EXECINSTR && in kexec_purgatory_setup_sechdrs()
944 pi->ehdr->e_entry >= sechdrs[i].sh_addr && in kexec_purgatory_setup_sechdrs()
945 pi->ehdr->e_entry < (sechdrs[i].sh_addr in kexec_purgatory_setup_sechdrs()
946 + sechdrs[i].sh_size)) { in kexec_purgatory_setup_sechdrs()
947 kbuf->image->start -= sechdrs[i].sh_addr; in kexec_purgatory_setup_sechdrs()
951 src = (void *)pi->ehdr + sechdrs[i].sh_offset; in kexec_purgatory_setup_sechdrs()
953 memcpy(dst, src, sechdrs[i].sh_size); in kexec_purgatory_setup_sechdrs()
955 sechdrs[i].sh_addr = kbuf->mem + offset; in kexec_purgatory_setup_sechdrs()
956 sechdrs[i].sh_offset = offset; in kexec_purgatory_setup_sechdrs()
957 offset += sechdrs[i].sh_size; in kexec_purgatory_setup_sechdrs()
967 const Elf_Shdr *sechdrs; in kexec_apply_relocations() local
969 sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff; in kexec_apply_relocations()
976 relsec = sechdrs + i; in kexec_apply_relocations()
992 section = pi->sechdrs + relsec->sh_info; in kexec_apply_relocations()
993 symtab = sechdrs + relsec->sh_link; in kexec_apply_relocations()
1058 vfree(pi->sechdrs); in kexec_load_purgatory()
1059 pi->sechdrs = NULL; in kexec_load_purgatory()
1076 const Elf_Shdr *sechdrs; in kexec_purgatory_find_symbol() local
1086 sechdrs = (void *)ehdr + ehdr->e_shoff; in kexec_purgatory_find_symbol()
1089 if (sechdrs[i].sh_type != SHT_SYMTAB) in kexec_purgatory_find_symbol()
1092 if (sechdrs[i].sh_link >= ehdr->e_shnum) in kexec_purgatory_find_symbol()
1095 strtab = (void *)ehdr + sechdrs[sechdrs[i].sh_link].sh_offset; in kexec_purgatory_find_symbol()
1096 syms = (void *)ehdr + sechdrs[i].sh_offset; in kexec_purgatory_find_symbol()
1099 for (k = 0; k < sechdrs[i].sh_size/sizeof(Elf_Sym); k++) { in kexec_purgatory_find_symbol()
1131 sechdr = &pi->sechdrs[sym->st_shndx]; in kexec_purgatory_get_symbol_addr()
1162 sec = pi->sechdrs + sym->st_shndx; in kexec_purgatory_get_set_symbol()