Home
last modified time | relevance | path

Searched refs:sechdrs (Results 1 – 11 of 11) sorted by relevance

/kernel/
Dkexec_file.c108 vfree(pi->sechdrs); in kimage_file_post_load_cleanup()
109 pi->sechdrs = NULL; in kimage_file_post_load_cleanup()
804 const Elf_Shdr *sechdrs; in kexec_purgatory_setup_kbuf() local
810 sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff; in kexec_purgatory_setup_kbuf()
815 if (!(sechdrs[i].sh_flags & SHF_ALLOC)) in kexec_purgatory_setup_kbuf()
818 align = sechdrs[i].sh_addralign; in kexec_purgatory_setup_kbuf()
819 if (sechdrs[i].sh_type != SHT_NOBITS) { in kexec_purgatory_setup_kbuf()
823 kbuf->bufsz += sechdrs[i].sh_size; in kexec_purgatory_setup_kbuf()
828 bss_sz += sechdrs[i].sh_size; in kexec_purgatory_setup_kbuf()
867 Elf_Shdr *sechdrs; in kexec_purgatory_setup_sechdrs() local
[all …]
Dcfi.c48 void module_cfi_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, in module_cfi_finalize() argument
57 secstrings = (char *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; in module_cfi_finalize()
60 if (strcmp(secstrings + sechdrs[i].sh_name, "__kcfi_traps")) in module_cfi_finalize()
63 mod->kcfi_traps = (s32 *)sechdrs[i].sh_addr; in module_cfi_finalize()
64 mod->kcfi_traps_end = (s32 *)(sechdrs[i].sh_addr + sechdrs[i].sh_size); in module_cfi_finalize()
/kernel/module/
Dlivepatch.c33 size = sizeof(*info->sechdrs) * info->hdr->e_shnum; in copy_module_elf()
34 mod->klp_info->sechdrs = kmemdup(info->sechdrs, size, GFP_KERNEL); in copy_module_elf()
35 if (!mod->klp_info->sechdrs) { in copy_module_elf()
41 size = info->sechdrs[info->hdr->e_shstrndx].sh_size; in copy_module_elf()
58 mod->klp_info->sechdrs[symndx].sh_addr = (unsigned long)mod->core_kallsyms.symtab; in copy_module_elf()
63 kfree(mod->klp_info->sechdrs); in copy_module_elf()
71 kfree(mod->klp_info->sechdrs); in free_module_elf()
Dkallsyms.c39 const Elf_Shdr *sechdrs = info->sechdrs; in elf_type() local
53 if (sechdrs[sym->st_shndx].sh_flags & SHF_EXECINSTR) in elf_type()
55 if (sechdrs[sym->st_shndx].sh_flags & SHF_ALLOC && in elf_type()
56 sechdrs[sym->st_shndx].sh_type != SHT_NOBITS) { in elf_type()
57 if (!(sechdrs[sym->st_shndx].sh_flags & SHF_WRITE)) in elf_type()
59 else if (sechdrs[sym->st_shndx].sh_flags & ARCH_SHF_SMALL) in elf_type()
64 if (sechdrs[sym->st_shndx].sh_type == SHT_NOBITS) { in elf_type()
65 if (sechdrs[sym->st_shndx].sh_flags & ARCH_SHF_SMALL) in elf_type()
70 if (strstarts(info->secstrings + sechdrs[sym->st_shndx].sh_name, in elf_type()
77 static bool is_core_symbol(const Elf_Sym *src, const Elf_Shdr *sechdrs, in is_core_symbol() argument
[all …]
Ddebug_kmemleak.c22 if (!(info->sechdrs[i].sh_flags & SHF_ALLOC) || in kmemleak_load_module()
23 !(info->sechdrs[i].sh_flags & SHF_WRITE) || in kmemleak_load_module()
24 (info->sechdrs[i].sh_flags & SHF_EXECINSTR)) in kmemleak_load_module()
27 kmemleak_scan_area((void *)info->sechdrs[i].sh_addr, in kmemleak_load_module()
28 info->sechdrs[i].sh_size, GFP_KERNEL); in kmemleak_load_module()
Dmain.c186 Elf_Shdr *shdr = &info->sechdrs[i]; in find_sec()
199 return (void *)info->sechdrs[find_sec(info, name)].sh_addr; in section_addr()
211 *num = info->sechdrs[sec].sh_size / object_size; in section_objs()
212 return (void *)info->sechdrs[sec].sh_addr; in section_objs()
221 Elf_Shdr *shdr = &info->sechdrs[i]; in find_any_sec()
240 *num = info->sechdrs[sec].sh_size / object_size; in any_section_objs()
241 return (void *)info->sechdrs[sec].sh_addr; in any_section_objs()
376 Elf_Shdr *pcpusec = &info->sechdrs[info->index.pcpu]; in percpu_modalloc()
472 if (info->sechdrs[info->index.pcpu].sh_size != 0) in percpu_modalloc()
1318 Elf_Shdr *symsec = &info->sechdrs[info->index.sym]; in simplify_symbols()
[all …]
Dversion.c18 Elf_Shdr *sechdrs = info->sechdrs; in check_version() local
31 versions = (void *)sechdrs[versindex].sh_addr; in check_version()
32 num_versions = sechdrs[versindex].sh_size in check_version()
Dsysfs.c81 if (!sect_empty(&info->sechdrs[i])) in add_sect_attrs()
98 Elf_Shdr *sec = &info->sechdrs[i]; in add_sect_attrs()
185 if (!sect_empty(&info->sechdrs[i]) && in add_notes_attrs()
186 info->sechdrs[i].sh_type == SHT_NOTE) in add_notes_attrs()
200 if (sect_empty(&info->sechdrs[i])) in add_notes_attrs()
202 if (info->sechdrs[i].sh_type == SHT_NOTE) { in add_notes_attrs()
206 nattr->size = info->sechdrs[i].sh_size; in add_notes_attrs()
207 nattr->private = (void *)info->sechdrs[i].sh_addr; in add_notes_attrs()
Dstrict_rwx.c125 int module_enforce_rwx_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, in module_enforce_rwx_sections() argument
135 if ((sechdrs[i].sh_flags & shf_wx) == shf_wx) { in module_enforce_rwx_sections()
137 mod->name, secstrings + sechdrs[i].sh_name, i); in module_enforce_rwx_sections()
Dinternal.h63 Elf_Shdr *sechdrs; member
225 int module_enforce_rwx_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
/kernel/livepatch/
Dcore.c193 static int klp_resolve_symbols(Elf_Shdr *sechdrs, const char *strtab, in klp_resolve_symbols() argument
221 sym = (Elf_Sym *)sechdrs[symndx].sh_addr + ELF_R_SYM(relas[i].r_info); in klp_resolve_symbols()
287 int klp_apply_section_relocs(struct module *pmod, Elf_Shdr *sechdrs, in klp_apply_section_relocs() argument
294 Elf_Shdr *sec = sechdrs + secndx; in klp_apply_section_relocs()
312 ret = klp_resolve_symbols(sechdrs, strtab, symndx, sec, sec_objname); in klp_apply_section_relocs()
316 return apply_relocate_add(sechdrs, strtab, symndx, secndx, pmod); in klp_apply_section_relocs()
772 Elf_Shdr *sec = info->sechdrs + i; in klp_apply_object_relocs()
777 ret = klp_apply_section_relocs(patch->mod, info->sechdrs, in klp_apply_object_relocs()