Searched refs:sechdrs (Results 26 - 50 of 57) sorted by last modified time

123

/linux-master/kernel/module/
H A Dstrict_rwx.c81 int module_enforce_rwx_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, argument
91 if ((sechdrs[i].sh_flags & shf_wx) == shf_wx) {
93 mod->name, secstrings + sechdrs[i].sh_name, i);
H A Dinternal.h67 Elf_Shdr *sechdrs; member in struct:load_info
328 int module_enforce_rwx_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
H A Dsysfs.c81 if (!sect_empty(&info->sechdrs[i]))
98 Elf_Shdr *sec = &info->sechdrs[i];
185 if (!sect_empty(&info->sechdrs[i]) &&
186 info->sechdrs[i].sh_type == SHT_NOTE)
200 if (sect_empty(&info->sechdrs[i]))
202 if (info->sechdrs[i].sh_type == SHT_NOTE) {
206 nattr->size = info->sechdrs[i].sh_size;
207 nattr->private = (void *)info->sechdrs[i].sh_addr;
H A Dlivepatch.c33 size = sizeof(*info->sechdrs) * info->hdr->e_shnum;
34 mod->klp_info->sechdrs = kmemdup(info->sechdrs, size, GFP_KERNEL);
35 if (!mod->klp_info->sechdrs) {
41 size = info->sechdrs[info->hdr->e_shstrndx].sh_size;
58 mod->klp_info->sechdrs[symndx].sh_addr = (unsigned long)mod->core_kallsyms.symtab;
63 kfree(mod->klp_info->sechdrs);
71 kfree(mod->klp_info->sechdrs);
H A Dversion.c18 Elf_Shdr *sechdrs = info->sechdrs; local
31 versions = (void *)sechdrs[versindex].sh_addr;
32 num_versions = sechdrs[versindex].sh_size
H A Ddebug_kmemleak.c22 if (!(info->sechdrs[i].sh_flags & SHF_ALLOC) ||
23 !(info->sechdrs[i].sh_flags & SHF_WRITE) ||
24 (info->sechdrs[i].sh_flags & SHF_EXECINSTR))
27 kmemleak_scan_area((void *)info->sechdrs[i].sh_addr,
28 info->sechdrs[i].sh_size, GFP_KERNEL);
/linux-master/arch/x86/kernel/
H A Dmachine_kexec_64.c394 const Elf_Shdr *sechdrs; local
397 sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff;
398 strtab = (char *)pi->ehdr + sechdrs[symtabsec->sh_link].sh_offset;
399 shstrtab = (char *)pi->ehdr + sechdrs[pi->ehdr->e_shstrndx].sh_offset;
437 name = shstrtab + sechdrs[sym->st_shndx].sh_name;
460 sec_base = pi->sechdrs[sym->st_shndx].sh_addr;
/linux-master/arch/s390/kernel/
H A Dmachine_kexec_file.c315 const Elf_Shdr *sechdrs; local
321 sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff;
322 strtab = (char *)pi->ehdr + sechdrs[symtab->sh_link].sh_offset;
323 shstrtab = (char *)pi->ehdr + sechdrs[pi->ehdr->e_shstrndx].sh_offset;
339 name = shstrtab + sechdrs[sym->st_shndx].sh_name;
364 val += pi->sechdrs[sym->st_shndx].sh_addr;
/linux-master/arch/riscv/kernel/
H A Delf_kexec.c377 const Elf_Shdr *sechdrs; local
382 sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff;
383 strtab = (char *)pi->ehdr + sechdrs[symtab->sh_link].sh_offset;
384 shstrtab = (char *)pi->ehdr + sechdrs[pi->ehdr->e_shstrndx].sh_offset;
401 name = shstrtab + sechdrs[sym->st_shndx].sh_name;
414 sec_base = pi->sechdrs[sym->st_shndx].sh_addr;
/linux-master/arch/arm/kernel/
H A Dvdso.c103 Elf32_Shdr *sechdrs; local
108 sechdrs = (void *)ehdr + ehdr->e_shoff;
109 secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset;
113 if (strcmp(secnames + sechdrs[i].sh_name, name) == 0) {
115 *size = sechdrs[i].sh_size;
116 return (void *)ehdr + sechdrs[i].sh_offset;
H A Dmodule-plts.c209 int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, argument
214 Elf32_Shdr *s, *sechdrs_end = sechdrs + ehdr->e_shnum;
221 for (s = sechdrs; s < sechdrs_end; ++s) {
239 for (s = sechdrs + 1; s < sechdrs_end; ++s) {
242 Elf32_Shdr *dstsec = sechdrs + s->sh_info;
/linux-master/scripts/mod/
H A Dmodpost.h115 Elf_Shdr *sechdrs; member in struct:elf_info
/linux-master/arch/mips/kernel/
H A Dvpe.c183 Elf_Shdr *sechdrs, const char *secstrings)
197 sechdrs[i].sh_entsize = ~0UL;
201 Elf_Shdr *s = &sechdrs[i];
424 static int apply_relocations(Elf32_Shdr *sechdrs, argument
430 Elf32_Rel *rel = (void *) sechdrs[relsec].sh_addr;
437 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
441 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
444 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
476 static void simplify_symbols(Elf_Shdr *sechdrs, argument
182 layout_sections(struct module *mod, const Elf_Ehdr *hdr, Elf_Shdr *sechdrs, const char *secstrings) argument
535 dump_elfsymbols(Elf_Shdr *sechdrs, unsigned int symindex, const char *strtab, struct module *mod) argument
549 find_vpe_symbols(struct vpe *v, Elf_Shdr *sechdrs, unsigned int symindex, const char *strtab, struct module *mod) argument
578 Elf_Shdr *sechdrs; local
[all...]
/linux-master/include/linux/
H A Dcfi.h40 void module_cfi_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs,
44 const Elf_Shdr *sechdrs,
43 module_cfi_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod) argument
/linux-master/arch/arm64/kernel/
H A Dmodule-plts.c69 u64 module_emit_plt_entry(struct module *mod, Elf64_Shdr *sechdrs, argument
75 struct plt_entry *plt = (struct plt_entry *)sechdrs[pltsec->plt_shndx].sh_addr;
101 u64 module_emit_veneer_for_adrp(struct module *mod, Elf64_Shdr *sechdrs, argument
106 struct plt_entry *plt = (struct plt_entry *)sechdrs[pltsec->plt_shndx].sh_addr;
280 int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, argument
294 if (!strcmp(secstrings + sechdrs[i].sh_name, ".plt"))
296 else if (!strcmp(secstrings + sechdrs[i].sh_name, ".init.plt"))
298 else if (!strcmp(secstrings + sechdrs[i].sh_name,
300 tramp = sechdrs + i;
301 else if (sechdrs[
[all...]
/linux-master/arch/arm64/include/asm/
H A Dmodule.h24 u64 module_emit_plt_entry(struct module *mod, Elf64_Shdr *sechdrs,
28 u64 module_emit_veneer_for_adrp(struct module *mod, Elf64_Shdr *sechdrs,
54 const Elf_Shdr *sechdrs,
58 const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
60 for (s = sechdrs, se = sechdrs + hdr->e_shnum; s < se; s++) {
53 find_section(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, const char *name) argument
/linux-master/arch/loongarch/kernel/
H A Dmodule-sections.c12 Elf_Addr module_emit_got_entry(struct module *mod, Elf_Shdr *sechdrs, Elf_Addr val) argument
16 struct got_entry *got = get_got_entry(val, sechdrs, got_sec);
22 got = (struct got_entry *)sechdrs[got_sec->shndx].sh_addr;
38 Elf_Addr module_emit_plt_entry(struct module *mod, Elf_Shdr *sechdrs, Elf_Addr val) argument
43 struct plt_entry *plt = get_plt_entry(val, sechdrs, plt_sec, plt_idx_sec);
52 plt = (struct plt_entry *)sechdrs[plt_sec->shndx].sh_addr;
54 plt_idx = (struct plt_idx_entry *)sechdrs[plt_idx_sec->shndx].sh_addr;
104 int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, argument
114 if (!strcmp(secstrings + sechdrs[i].sh_name, ".got"))
116 else if (!strcmp(secstrings + sechdrs[
[all...]
/linux-master/arch/powerpc/kernel/
H A Dmodule_64.c208 const Elf64_Shdr *sechdrs)
216 if (sechdrs[i].sh_type == SHT_RELA) {
219 (void *)sechdrs[i].sh_addr,
220 sechdrs[i].sh_size / sizeof(Elf64_Rela));
227 sort((void *)sechdrs[i].sh_addr,
228 sechdrs[i].sh_size / sizeof(Elf64_Rela),
231 relocs += count_relocs((void *)sechdrs[i].sh_addr,
232 sechdrs[i].sh_size
236 relocs += count_relocs((void *)sechdrs[i].sh_addr,
237 sechdrs[
207 get_stubs_size(const Elf64_Ehdr *hdr, const Elf64_Shdr *sechdrs) argument
258 count_pcpu_relocs(const Elf64_Shdr *sechdrs, const Elf64_Rela *rela, unsigned int num, unsigned int symindex, unsigned int pcpu) argument
288 get_got_size(const Elf64_Ehdr *hdr, const Elf64_Shdr *sechdrs, struct module *me) argument
378 find_dot_toc(Elf64_Shdr *sechdrs, const char *strtab, unsigned int symindex) argument
403 module_frob_arch_sections(Elf64_Ehdr *hdr, Elf64_Shdr *sechdrs, char *secstrings, struct module *me) argument
580 my_r2(const Elf64_Shdr *sechdrs, struct module *me) argument
590 create_stub(const Elf64_Shdr *sechdrs, struct ppc64_stub_entry *entry, unsigned long addr, struct module *me, const char *name) argument
667 stub_for_addr(const Elf64_Shdr *sechdrs, unsigned long addr, struct module *me, const char *name) argument
695 got_for_addr(const Elf64_Shdr *sechdrs, unsigned long addr, struct module *me, const char *name) argument
764 apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab, unsigned int symindex, unsigned int relsec, struct module *me) argument
1089 module_finalize_ftrace(struct module *mod, const Elf_Shdr *sechdrs) argument
[all...]
H A Dmodule_32.c74 const Elf32_Shdr *sechdrs,
86 if ((strstr(secstrings + sechdrs[i].sh_name, ".init") != NULL)
91 if (strstr(secstrings + sechdrs[i].sh_name, ".debug"))
94 if (sechdrs[i].sh_type == SHT_RELA) {
97 (void *)hdr + sechdrs[i].sh_offset,
98 sechdrs[i].sh_size / sizeof(Elf32_Rela));
105 sort((void *)hdr + sechdrs[i].sh_offset,
106 sechdrs[i].sh_size / sizeof(Elf32_Rela),
110 + sechdrs[i].sh_offset,
111 sechdrs[
73 get_plt_size(const Elf32_Ehdr *hdr, const Elf32_Shdr *sechdrs, const char *secstrings, int is_init) argument
120 module_frob_arch_sections(Elf32_Ehdr *hdr, Elf32_Shdr *sechdrs, char *secstrings, struct module *me) argument
157 do_plt_call(void *location, Elf32_Addr val, const Elf32_Shdr *sechdrs, struct module *mod) argument
196 apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, unsigned int relsec, struct module *module) argument
322 module_finalize_ftrace(struct module *module, const Elf_Shdr *sechdrs) argument
[all...]
/linux-master/arch/csky/kernel/
H A Dmodule.c49 int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, argument
53 Elf32_Rela *rel = (void *) sechdrs[relsec].sh_addr;
58 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
60 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
62 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
/linux-master/arch/riscv/include/asm/
H A Dmodule.h116 const Elf_Shdr *sechdrs,
120 const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
122 for (s = sechdrs, se = sechdrs + hdr->e_shnum; s < se; s++) {
115 find_section(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, const char *name) argument
/linux-master/arch/alpha/kernel/
H A Dmodule.c64 module_frob_arch_sections(Elf64_Ehdr *hdr, Elf64_Shdr *sechdrs, argument
72 esechdrs = sechdrs + hdr->e_shnum;
78 for (s = sechdrs; s < esechdrs; ++s)
83 me->arch.gotsecindex = s - sechdrs;
110 for (s = sechdrs; s < esechdrs; ++s)
133 apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab, argument
137 Elf64_Rela *rela = (void *)sechdrs[relsec].sh_addr;
138 unsigned long i, n = sechdrs[relsec].sh_size / sizeof(*rela);
144 sechdrs[relsec].sh_info);
146 base = (void *)sechdrs[sechdr
[all...]
/linux-master/lib/
H A Dbug.c88 void module_bug_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, argument
98 secstrings = (char *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
100 if (strcmp(secstrings+sechdrs[i].sh_name, "__bug_table"))
102 mod->bug_table = (void *) sechdrs[i].sh_addr;
103 mod->num_bugs = sechdrs[i].sh_size / sizeof(struct bug_entry);
/linux-master/kernel/
H A Dcfi.c48 void module_cfi_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, argument
57 secstrings = (char *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
60 if (strcmp(secstrings + sechdrs[i].sh_name, "__kcfi_traps"))
63 mod->kcfi_traps = (s32 *)sechdrs[i].sh_addr;
64 mod->kcfi_traps_end = (s32 *)(sechdrs[i].sh_addr + sechdrs[i].sh_size);
/linux-master/arch/microblaze/kernel/
H A Dmodule.c18 int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, argument
23 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr;
29 relsec, sechdrs[relsec].sh_info);
31 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) {
33 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr +
35 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr +
91 int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, argument

Completed in 452 milliseconds

123