Home
last modified time | relevance | path

Searched refs:sechdrs (Results 1 - 25 of 110) sorted by relevance

12345

/kernel/linux/linux-6.6/arch/powerpc/kernel/
H A Dmodule_64.c208 const Elf64_Shdr *sechdrs) in get_stubs_size()
216 if (sechdrs[i].sh_type == SHT_RELA) { in get_stubs_size()
219 (void *)sechdrs[i].sh_addr, in get_stubs_size()
220 sechdrs[i].sh_size / sizeof(Elf64_Rela)); in get_stubs_size()
227 sort((void *)sechdrs[i].sh_addr, in get_stubs_size()
228 sechdrs[i].sh_size / sizeof(Elf64_Rela), in get_stubs_size()
231 relocs += count_relocs((void *)sechdrs[i].sh_addr, in get_stubs_size()
232 sechdrs[i].sh_size in get_stubs_size()
236 relocs += count_relocs((void *)sechdrs[i].sh_addr, in get_stubs_size()
237 sechdrs[ in get_stubs_size()
207 get_stubs_size(const Elf64_Ehdr *hdr, const Elf64_Shdr *sechdrs) get_stubs_size() argument
258 count_pcpu_relocs(const Elf64_Shdr *sechdrs, const Elf64_Rela *rela, unsigned int num, unsigned int symindex, unsigned int pcpu) count_pcpu_relocs() argument
288 get_got_size(const Elf64_Ehdr *hdr, const Elf64_Shdr *sechdrs, struct module *me) get_got_size() argument
378 find_dot_toc(Elf64_Shdr *sechdrs, const char *strtab, unsigned int symindex) find_dot_toc() argument
403 module_frob_arch_sections(Elf64_Ehdr *hdr, Elf64_Shdr *sechdrs, char *secstrings, struct module *me) module_frob_arch_sections() argument
580 my_r2(const Elf64_Shdr *sechdrs, struct module *me) my_r2() argument
590 create_stub(const Elf64_Shdr *sechdrs, struct ppc64_stub_entry *entry, unsigned long addr, struct module *me, const char *name) create_stub() argument
667 stub_for_addr(const Elf64_Shdr *sechdrs, unsigned long addr, struct module *me, const char *name) stub_for_addr() argument
695 got_for_addr(const Elf64_Shdr *sechdrs, unsigned long addr, struct module *me, const char *name) got_for_addr() argument
764 apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab, unsigned int symindex, unsigned int relsec, struct module *me) apply_relocate_add() argument
1089 module_finalize_ftrace(struct module *mod, const Elf_Shdr *sechdrs) module_finalize_ftrace() argument
[all...]
H A Dmodule_32.c74 const Elf32_Shdr *sechdrs, in get_plt_size()
86 if ((strstr(secstrings + sechdrs[i].sh_name, ".init") != NULL) in get_plt_size()
91 if (strstr(secstrings + sechdrs[i].sh_name, ".debug")) in get_plt_size()
94 if (sechdrs[i].sh_type == SHT_RELA) { in get_plt_size()
97 (void *)hdr + sechdrs[i].sh_offset, in get_plt_size()
98 sechdrs[i].sh_size / sizeof(Elf32_Rela)); in get_plt_size()
105 sort((void *)hdr + sechdrs[i].sh_offset, in get_plt_size()
106 sechdrs[i].sh_size / sizeof(Elf32_Rela), in get_plt_size()
110 + sechdrs[i].sh_offset, in get_plt_size()
111 sechdrs[ in get_plt_size()
73 get_plt_size(const Elf32_Ehdr *hdr, const Elf32_Shdr *sechdrs, const char *secstrings, int is_init) get_plt_size() argument
120 module_frob_arch_sections(Elf32_Ehdr *hdr, Elf32_Shdr *sechdrs, char *secstrings, struct module *me) module_frob_arch_sections() argument
157 do_plt_call(void *location, Elf32_Addr val, const Elf32_Shdr *sechdrs, struct module *mod) do_plt_call() argument
196 apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, unsigned int relsec, struct module *module) apply_relocate_add() argument
322 module_finalize_ftrace(struct module *module, const Elf_Shdr *sechdrs) module_finalize_ftrace() argument
[all...]
H A Dmodule.c23 const Elf_Shdr *sechdrs, in find_section()
29 secstrings = (char *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; in find_section()
31 if (strcmp(secstrings+sechdrs[i].sh_name, name) == 0) in find_section()
32 return &sechdrs[i]; in find_section()
37 const Elf_Shdr *sechdrs, struct module *me) in module_finalize()
42 rc = module_finalize_ftrace(me, sechdrs); in module_finalize()
47 sect = find_section(hdr, sechdrs, "__ftr_fixup"); in module_finalize()
53 sect = find_section(hdr, sechdrs, "__mmu_ftr_fixup"); in module_finalize()
60 sect = find_section(hdr, sechdrs, "__fw_ftr_fixup"); in module_finalize()
68 sect = find_section(hdr, sechdrs, " in module_finalize()
22 find_section(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, const char *name) find_section() argument
36 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) module_finalize() argument
[all...]
/kernel/linux/linux-6.6/arch/mips/kernel/
H A Dvpe.c183 Elf_Shdr *sechdrs, const char *secstrings) in layout_sections()
197 sechdrs[i].sh_entsize = ~0UL; in layout_sections()
201 Elf_Shdr *s = &sechdrs[i]; in layout_sections()
424 static int apply_relocations(Elf32_Shdr *sechdrs, in apply_relocations() argument
430 Elf32_Rel *rel = (void *) sechdrs[relsec].sh_addr; in apply_relocations()
437 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocations()
441 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocations()
444 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocations()
476 static void simplify_symbols(Elf_Shdr *sechdrs, in simplify_symbols() argument
182 layout_sections(struct module *mod, const Elf_Ehdr *hdr, Elf_Shdr *sechdrs, const char *secstrings) layout_sections() argument
535 dump_elfsymbols(Elf_Shdr *sechdrs, unsigned int symindex, const char *strtab, struct module *mod) dump_elfsymbols() argument
549 find_vpe_symbols(struct vpe *v, Elf_Shdr *sechdrs, unsigned int symindex, const char *strtab, struct module *mod) find_vpe_symbols() argument
578 Elf_Shdr *sechdrs; vpe_elfload() local
[all...]
/kernel/linux/linux-5.10/arch/powerpc/kernel/
H A Dmodule_64.c196 const Elf64_Shdr *sechdrs) in get_stubs_size()
204 if (sechdrs[i].sh_type == SHT_RELA) { in get_stubs_size()
207 (void *)sechdrs[i].sh_addr, in get_stubs_size()
208 sechdrs[i].sh_size / sizeof(Elf64_Rela)); in get_stubs_size()
215 sort((void *)sechdrs[i].sh_addr, in get_stubs_size()
216 sechdrs[i].sh_size / sizeof(Elf64_Rela), in get_stubs_size()
219 relocs += count_relocs((void *)sechdrs[i].sh_addr, in get_stubs_size()
220 sechdrs[i].sh_size in get_stubs_size()
270 static Elf64_Sym *find_dot_toc(Elf64_Shdr *sechdrs, in find_dot_toc() argument
277 syms = (Elf64_Sym *)sechdrs[syminde in find_dot_toc()
195 get_stubs_size(const Elf64_Ehdr *hdr, const Elf64_Shdr *sechdrs) get_stubs_size() argument
288 module_frob_arch_sections(Elf64_Ehdr *hdr, Elf64_Shdr *sechdrs, char *secstrings, struct module *me) module_frob_arch_sections() argument
429 my_r2(const Elf64_Shdr *sechdrs, struct module *me) my_r2() argument
435 create_stub(const Elf64_Shdr *sechdrs, struct ppc64_stub_entry *entry, unsigned long addr, struct module *me, const char *name) create_stub() argument
467 stub_for_addr(const Elf64_Shdr *sechdrs, unsigned long addr, struct module *me, const char *name) stub_for_addr() argument
520 apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab, unsigned int symindex, unsigned int relsec, struct module *me) apply_relocate_add() argument
781 module_finalize_ftrace(struct module *mod, const Elf_Shdr *sechdrs) module_finalize_ftrace() argument
[all...]
H A Dmodule_32.c73 const Elf32_Shdr *sechdrs, in get_plt_size()
85 if ((strstr(secstrings + sechdrs[i].sh_name, ".init") != NULL) in get_plt_size()
90 if (strstr(secstrings + sechdrs[i].sh_name, ".debug")) in get_plt_size()
93 if (sechdrs[i].sh_type == SHT_RELA) { in get_plt_size()
96 (void *)hdr + sechdrs[i].sh_offset, in get_plt_size()
97 sechdrs[i].sh_size / sizeof(Elf32_Rela)); in get_plt_size()
104 sort((void *)hdr + sechdrs[i].sh_offset, in get_plt_size()
105 sechdrs[i].sh_size / sizeof(Elf32_Rela), in get_plt_size()
109 + sechdrs[i].sh_offset, in get_plt_size()
110 sechdrs[ in get_plt_size()
72 get_plt_size(const Elf32_Ehdr *hdr, const Elf32_Shdr *sechdrs, const char *secstrings, int is_init) get_plt_size() argument
119 module_frob_arch_sections(Elf32_Ehdr *hdr, Elf32_Shdr *sechdrs, char *secstrings, struct module *me) module_frob_arch_sections() argument
157 do_plt_call(void *location, Elf32_Addr val, const Elf32_Shdr *sechdrs, struct module *mod) do_plt_call() argument
193 apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, unsigned int relsec, struct module *module) apply_relocate_add() argument
283 module_finalize_ftrace(struct module *module, const Elf_Shdr *sechdrs) module_finalize_ftrace() argument
[all...]
H A Dmodule.c21 const Elf_Shdr *sechdrs, in find_section()
27 secstrings = (char *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; in find_section()
29 if (strcmp(secstrings+sechdrs[i].sh_name, name) == 0) in find_section()
30 return &sechdrs[i]; in find_section()
35 const Elf_Shdr *sechdrs, struct module *me) in module_finalize()
40 rc = module_finalize_ftrace(me, sechdrs); in module_finalize()
45 sect = find_section(hdr, sechdrs, "__ftr_fixup"); in module_finalize()
51 sect = find_section(hdr, sechdrs, "__mmu_ftr_fixup"); in module_finalize()
58 sect = find_section(hdr, sechdrs, "__fw_ftr_fixup"); in module_finalize()
66 sect = find_section(hdr, sechdrs, " in module_finalize()
20 find_section(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, const char *name) find_section() argument
34 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) module_finalize() argument
[all...]
/kernel/linux/linux-5.10/arch/loongarch/kernel/
H A Dmodule-sections.c12 Elf_Addr module_emit_got_entry(struct module *mod, Elf_Shdr *sechdrs, Elf_Addr val) in module_emit_got_entry() argument
16 struct got_entry *got = get_got_entry(val, sechdrs, got_sec); in module_emit_got_entry()
22 got = (struct got_entry *)sechdrs[got_sec->shndx].sh_addr; in module_emit_got_entry()
38 Elf_Addr module_emit_plt_entry(struct module *mod, Elf_Shdr *sechdrs, Elf_Addr val) in module_emit_plt_entry() argument
43 struct plt_entry *plt = get_plt_entry(val, sechdrs, plt_sec, plt_idx_sec); in module_emit_plt_entry()
52 plt = (struct plt_entry *)sechdrs[plt_sec->shndx].sh_addr; in module_emit_plt_entry()
54 plt_idx = (struct plt_idx_entry *)sechdrs[plt_idx_sec->shndx].sh_addr; in module_emit_plt_entry()
104 int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, in module_frob_arch_sections() argument
114 if (!strcmp(secstrings + sechdrs[i].sh_name, ".got")) in module_frob_arch_sections()
116 else if (!strcmp(secstrings + sechdrs[ in module_frob_arch_sections()
[all...]
/kernel/linux/linux-6.6/arch/loongarch/kernel/
H A Dmodule-sections.c12 Elf_Addr module_emit_got_entry(struct module *mod, Elf_Shdr *sechdrs, Elf_Addr val) in module_emit_got_entry() argument
16 struct got_entry *got = get_got_entry(val, sechdrs, got_sec); in module_emit_got_entry()
22 got = (struct got_entry *)sechdrs[got_sec->shndx].sh_addr; in module_emit_got_entry()
38 Elf_Addr module_emit_plt_entry(struct module *mod, Elf_Shdr *sechdrs, Elf_Addr val) in module_emit_plt_entry() argument
43 struct plt_entry *plt = get_plt_entry(val, sechdrs, plt_sec, plt_idx_sec); in module_emit_plt_entry()
52 plt = (struct plt_entry *)sechdrs[plt_sec->shndx].sh_addr; in module_emit_plt_entry()
54 plt_idx = (struct plt_idx_entry *)sechdrs[plt_idx_sec->shndx].sh_addr; in module_emit_plt_entry()
104 int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, in module_frob_arch_sections() argument
114 if (!strcmp(secstrings + sechdrs[i].sh_name, ".got")) in module_frob_arch_sections()
116 else if (!strcmp(secstrings + sechdrs[ in module_frob_arch_sections()
[all...]
/kernel/linux/linux-5.10/arch/m68k/kernel/
H A Dmodule.c22 int apply_relocate(Elf32_Shdr *sechdrs, in apply_relocate() argument
29 Elf32_Rel *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate()
34 sechdrs[relsec].sh_info); in apply_relocate()
35 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate()
37 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate()
41 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate()
62 int apply_relocate_add(Elf32_Shdr *sechdrs, in apply_relocate_add() argument
69 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add()
74 sechdrs[relse in apply_relocate_add()
102 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod) module_finalize() argument
[all...]
/kernel/linux/linux-6.6/arch/m68k/kernel/
H A Dmodule.c22 int apply_relocate(Elf32_Shdr *sechdrs, in apply_relocate() argument
29 Elf32_Rel *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate()
34 sechdrs[relsec].sh_info); in apply_relocate()
35 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate()
37 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate()
41 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate()
62 int apply_relocate_add(Elf32_Shdr *sechdrs, in apply_relocate_add() argument
69 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add()
74 sechdrs[relse in apply_relocate_add()
102 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod) module_finalize() argument
[all...]
/kernel/linux/linux-5.10/arch/mips/kernel/
H A Dvpe.c183 Elf_Shdr *sechdrs, const char *secstrings) in layout_sections()
197 sechdrs[i].sh_entsize = ~0UL; in layout_sections()
201 Elf_Shdr *s = &sechdrs[i]; in layout_sections()
425 static int apply_relocations(Elf32_Shdr *sechdrs, in apply_relocations() argument
431 Elf32_Rel *rel = (void *) sechdrs[relsec].sh_addr; in apply_relocations()
438 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocations()
442 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocations()
445 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocations()
477 static void simplify_symbols(Elf_Shdr *sechdrs, in simplify_symbols() argument
182 layout_sections(struct module *mod, const Elf_Ehdr *hdr, Elf_Shdr *sechdrs, const char *secstrings) layout_sections() argument
536 dump_elfsymbols(Elf_Shdr *sechdrs, unsigned int symindex, const char *strtab, struct module *mod) dump_elfsymbols() argument
550 find_vpe_symbols(struct vpe *v, Elf_Shdr *sechdrs, unsigned int symindex, const char *strtab, struct module *mod) find_vpe_symbols() argument
579 Elf_Shdr *sechdrs; vpe_elfload() local
[all...]
/kernel/linux/linux-5.10/arch/arc/kernel/
H A Dmodule.c26 int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, in module_frob_arch_sections() argument
45 int apply_relocate_add(Elf32_Shdr *sechdrs, in apply_relocate_add() argument
52 Elf32_Rela *rel_entry = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add()
61 tgtsec = sechdrs[relsec].sh_info; in apply_relocate_add()
62 tgt_addr = sechdrs[tgtsec].sh_addr; in apply_relocate_add()
63 sym_sec = (Elf32_Sym *) sechdrs[symindex].sh_addr; in apply_relocate_add()
64 n = sechdrs[relsec].sh_size / sizeof(*rel_entry); in apply_relocate_add()
67 module->arch.secstr + sechdrs[tgtsec].sh_name, tgt_addr); in apply_relocate_add()
86 s = module->arch.secstr + sechdrs[sym_entry->st_shndx].sh_name; in apply_relocate_add()
114 if (strcmp(module->arch.secstr+sechdrs[tgtse in apply_relocate_add()
132 module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod) module_finalize() argument
[all...]
/kernel/linux/linux-6.6/arch/arc/kernel/
H A Dmodule.c26 int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, in module_frob_arch_sections() argument
45 int apply_relocate_add(Elf32_Shdr *sechdrs, in apply_relocate_add() argument
52 Elf32_Rela *rel_entry = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add()
61 tgtsec = sechdrs[relsec].sh_info; in apply_relocate_add()
62 tgt_addr = sechdrs[tgtsec].sh_addr; in apply_relocate_add()
63 sym_sec = (Elf32_Sym *) sechdrs[symindex].sh_addr; in apply_relocate_add()
64 n = sechdrs[relsec].sh_size / sizeof(*rel_entry); in apply_relocate_add()
67 module->arch.secstr + sechdrs[tgtsec].sh_name, tgt_addr); in apply_relocate_add()
86 s = module->arch.secstr + sechdrs[sym_entry->st_shndx].sh_name; in apply_relocate_add()
114 if (strcmp(module->arch.secstr+sechdrs[tgtse in apply_relocate_add()
132 module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod) module_finalize() argument
[all...]
/kernel/linux/linux-5.10/arch/sparc/kernel/
H A Dmodule.c56 Elf_Shdr *sechdrs, in module_frob_arch_sections()
65 for (symidx = 0; sechdrs[symidx].sh_type != SHT_SYMTAB; symidx++) { in module_frob_arch_sections()
71 sym = (Elf_Sym *)sechdrs[symidx].sh_addr; in module_frob_arch_sections()
72 strtab = (char *)sechdrs[sechdrs[symidx].sh_link].sh_addr; in module_frob_arch_sections()
74 for (i = 1; i < sechdrs[symidx].sh_size / sizeof(Elf_Sym); i++) { in module_frob_arch_sections()
83 int apply_relocate_add(Elf_Shdr *sechdrs, in apply_relocate_add() argument
90 Elf_Rela *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add()
95 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add()
99 location = (u8 *)sechdrs[sechdr in apply_relocate_add()
55 module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, char *secstrings, struct module *mod) module_frob_arch_sections() argument
184 do_patch_sections(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs) do_patch_sections() argument
207 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) module_finalize() argument
[all...]
/kernel/linux/linux-6.6/arch/sparc/kernel/
H A Dmodule.c56 Elf_Shdr *sechdrs, in module_frob_arch_sections()
65 for (symidx = 0; sechdrs[symidx].sh_type != SHT_SYMTAB; symidx++) { in module_frob_arch_sections()
71 sym = (Elf_Sym *)sechdrs[symidx].sh_addr; in module_frob_arch_sections()
72 strtab = (char *)sechdrs[sechdrs[symidx].sh_link].sh_addr; in module_frob_arch_sections()
74 for (i = 1; i < sechdrs[symidx].sh_size / sizeof(Elf_Sym); i++) { in module_frob_arch_sections()
83 int apply_relocate_add(Elf_Shdr *sechdrs, in apply_relocate_add() argument
90 Elf_Rela *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add()
95 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add()
99 location = (u8 *)sechdrs[sechdr in apply_relocate_add()
55 module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, char *secstrings, struct module *mod) module_frob_arch_sections() argument
184 do_patch_sections(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs) do_patch_sections() argument
207 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) module_finalize() argument
[all...]
/kernel/linux/linux-6.6/kernel/
H A Dkexec_file.c108 vfree(pi->sechdrs); in kimage_file_post_load_cleanup()
109 pi->sechdrs = NULL; in kimage_file_post_load_cleanup()
813 const Elf_Shdr *sechdrs; in kexec_purgatory_setup_kbuf() local
819 sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff; in kexec_purgatory_setup_kbuf()
824 if (!(sechdrs[i].sh_flags & SHF_ALLOC)) in kexec_purgatory_setup_kbuf()
827 align = sechdrs[i].sh_addralign; in kexec_purgatory_setup_kbuf()
828 if (sechdrs[i].sh_type != SHT_NOBITS) { in kexec_purgatory_setup_kbuf()
832 kbuf->bufsz += sechdrs[i].sh_size; in kexec_purgatory_setup_kbuf()
837 bss_sz += sechdrs[i].sh_size; in kexec_purgatory_setup_kbuf()
862 * kexec_purgatory_setup_sechdrs - prepares the pi->sechdrs buffe
877 Elf_Shdr *sechdrs; kexec_purgatory_setup_sechdrs() local
947 const Elf_Shdr *sechdrs; kexec_apply_relocations() local
1056 const Elf_Shdr *sechdrs; kexec_purgatory_find_symbol() local
[all...]
/kernel/linux/linux-5.10/arch/x86/kernel/
H A Dmodule.c89 int apply_relocate(Elf32_Shdr *sechdrs, in apply_relocate() argument
96 Elf32_Rel *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate()
101 relsec, sechdrs[relsec].sh_info); in apply_relocate()
102 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate()
104 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate()
108 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate()
130 static int __apply_relocate_add(Elf64_Shdr *sechdrs, in __apply_relocate_add() argument
138 Elf64_Rela *rel = (void *)sechdrs[relsec].sh_addr; in __apply_relocate_add()
144 relsec, sechdrs[relse in __apply_relocate_add()
221 apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab, unsigned int symindex, unsigned int relsec, struct module *me) apply_relocate_add() argument
249 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) module_finalize() argument
[all...]
/kernel/linux/linux-5.10/arch/hexagon/kernel/
H A Dmodule.c23 * @sechdrs - pointer to elf load section headers
27 int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, in module_frob_arch_sections() argument
37 secstrings + sechdrs[i].sh_name); in module_frob_arch_sections()
38 if (strcmp(secstrings + sechdrs[i].sh_name, ".plt") == 0) in module_frob_arch_sections()
40 if (strcmp(secstrings + sechdrs[i].sh_name, ".got.plt") == 0) in module_frob_arch_sections()
42 if (strcmp(secstrings + sechdrs[i].sh_name, ".rela.plt") == 0) in module_frob_arch_sections()
59 * @sechdrs - pointer to section headers
67 int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, in apply_relocate_add() argument
75 unsigned int nrelocs = sechdrs[relsec].sh_size / sizeof(Elf32_Rela); in apply_relocate_add()
76 Elf32_Rela *rela = (void *)sechdrs[relse in apply_relocate_add()
[all...]
/kernel/linux/linux-6.6/arch/hexagon/kernel/
H A Dmodule.c23 * @sechdrs - pointer to elf load section headers
27 int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, in module_frob_arch_sections() argument
37 secstrings + sechdrs[i].sh_name); in module_frob_arch_sections()
38 if (strcmp(secstrings + sechdrs[i].sh_name, ".plt") == 0) in module_frob_arch_sections()
40 if (strcmp(secstrings + sechdrs[i].sh_name, ".got.plt") == 0) in module_frob_arch_sections()
42 if (strcmp(secstrings + sechdrs[i].sh_name, ".rela.plt") == 0) in module_frob_arch_sections()
59 * @sechdrs - pointer to section headers
67 int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, in apply_relocate_add() argument
75 unsigned int nrelocs = sechdrs[relsec].sh_size / sizeof(Elf32_Rela); in apply_relocate_add()
76 Elf32_Rela *rela = (void *)sechdrs[relse in apply_relocate_add()
[all...]
/kernel/linux/linux-6.6/arch/microblaze/kernel/
H A Dmodule.c18 int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, in apply_relocate_add() argument
23 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add()
29 relsec, sechdrs[relsec].sh_info); in apply_relocate_add()
31 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { in apply_relocate_add()
33 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr + in apply_relocate_add()
35 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr + in apply_relocate_add()
91 int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, in module_finalize() argument
/kernel/linux/linux-6.6/kernel/module/
H A 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()
/kernel/linux/linux-5.10/arch/openrisc/kernel/
H A Dmodule.c16 int apply_relocate_add(Elf32_Shdr *sechdrs, in apply_relocate_add() argument
23 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add()
29 sechdrs[relsec].sh_info); in apply_relocate_add()
30 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add()
32 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
37 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
/kernel/linux/linux-6.6/arch/openrisc/kernel/
H A Dmodule.c16 int apply_relocate_add(Elf32_Shdr *sechdrs, in apply_relocate_add() argument
23 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add()
29 sechdrs[relsec].sh_info); in apply_relocate_add()
30 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add()
32 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
37 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
/kernel/linux/linux-6.6/include/linux/
H A Dmoduleloader.h21 Elf_Shdr *sechdrs,
55 int apply_relocate(Elf_Shdr *sechdrs,
61 static inline int apply_relocate(Elf_Shdr *sechdrs, in apply_relocate() argument
78 int apply_relocate_add(Elf_Shdr *sechdrs,
94 void clear_relocate_add(Elf_Shdr *sechdrs,
101 static inline int apply_relocate_add(Elf_Shdr *sechdrs, in apply_relocate_add() argument
115 const Elf_Shdr *sechdrs,

Completed in 12 milliseconds

12345