Home
last modified time | relevance | path

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

123

/linux/arch/powerpc/kernel/
A Dmodule_64.c232 sechdrs[i].sh_size in get_stubs_size()
237 sechdrs[i].sh_size in get_stubs_size()
289 const Elf64_Shdr *sechdrs, in get_got_size() argument
322 sechdrs[i].sh_size in get_got_size()
335 sechdrs[i].sh_size in get_got_size()
404 Elf64_Shdr *sechdrs, in module_frob_arch_sections() argument
430 sechdrs[i].sh_size); in module_frob_arch_sections()
436 + sechdrs[sechdrs[i].sh_link].sh_offset); in module_frob_arch_sections()
452 sechdrs[me->arch.got_section].sh_size = get_got_size(hdr, sechdrs, me); in module_frob_arch_sections()
463 sechdrs[me->arch.stubs_section].sh_size = get_stubs_size(hdr, sechdrs); in module_frob_arch_sections()
[all …]
A Dmodule_32.c74 const Elf32_Shdr *sechdrs, in get_plt_size() argument
94 if (sechdrs[i].sh_type == SHT_RELA) { in get_plt_size()
110 + sechdrs[i].sh_offset, in get_plt_size()
111 sechdrs[i].sh_size in get_plt_size()
121 Elf32_Shdr *sechdrs, in module_frob_arch_sections() argument
159 const Elf32_Shdr *sechdrs, in do_plt_call() argument
209 sechdrs[relsec].sh_info); in apply_relocate_add()
212 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
248 sechdrs, module); in apply_relocate_add()
326 sechdrs, module); in module_finalize_ftrace()
[all …]
A Dmodule.c20 const Elf_Shdr *sechdrs, in find_section() argument
28 if (strcmp(secstrings+sechdrs[i].sh_name, name) == 0) in find_section()
29 return &sechdrs[i]; in find_section()
34 const Elf_Shdr *sechdrs, struct module *me) in module_finalize() argument
39 rc = module_finalize_ftrace(me, sechdrs); in module_finalize()
44 sect = find_section(hdr, sechdrs, "__ftr_fixup"); in module_finalize()
50 sect = find_section(hdr, sechdrs, "__mmu_ftr_fixup"); in module_finalize()
57 sect = find_section(hdr, sechdrs, "__fw_ftr_fixup"); in module_finalize()
65 sect = find_section(hdr, sechdrs, ".opd"); in module_finalize()
73 sect = find_section(hdr, sechdrs, "__spec_barrier_fixup"); in module_finalize()
[all …]
/linux/arch/mips/kernel/
A Dvpe.c197 sechdrs[i].sh_entsize = ~0UL; in layout_sections()
201 Elf_Shdr *s = &sechdrs[i]; in layout_sections()
441 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocations()
490 bssbase = sechdrs[i].sh_addr; in simplify_symbols()
578 Elf_Shdr *sechdrs; in vpe_elfload() local
613 sechdrs[0].sh_addr = 0; in vpe_elfload()
621 (len < sechdrs[i].sh_offset + sechdrs[i].sh_size)) { in vpe_elfload()
630 sechdrs[i].sh_offset; in vpe_elfload()
660 sechdrs[i].sh_size); in vpe_elfload()
666 sechdrs[i].sh_addr); in vpe_elfload()
[all …]
/linux/arch/sparc/kernel/
A Dmodule.c26 Elf_Shdr *sechdrs, in module_frob_arch_sections() argument
41 sym = (Elf_Sym *)sechdrs[symidx].sh_addr; in module_frob_arch_sections()
42 strtab = (char *)sechdrs[sechdrs[symidx].sh_link].sh_addr; in module_frob_arch_sections()
53 int apply_relocate_add(Elf_Shdr *sechdrs, in apply_relocate_add() argument
60 Elf_Rela *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add()
69 location = (u8 *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
79 sym = (Elf_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
155 const Elf_Shdr *sechdrs) in do_patch_sections() argument
160 for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { in do_patch_sections()
178 const Elf_Shdr *sechdrs, in module_finalize() argument
[all …]
/linux/arch/m68k/kernel/
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()
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[relsec].sh_info); in apply_relocate_add()
77 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
81 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
[all …]
/linux/arch/loongarch/kernel/
A Dmodule-sections.c16 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()
114 if (!strcmp(secstrings + sechdrs[i].sh_name, ".got")) in module_frob_arch_sections()
121 tramp = sechdrs + i; in module_frob_arch_sections()
139 int num_rela = sechdrs[i].sh_size / sizeof(Elf_Rela); in module_frob_arch_sections()
140 Elf_Rela *relas = (void *)ehdr + sechdrs[i].sh_offset; in module_frob_arch_sections()
141 Elf_Shdr *dst_sec = sechdrs + sechdrs[i].sh_info; in module_frob_arch_sections()
143 if (sechdrs[i].sh_type != SHT_RELA) in module_frob_arch_sections()
153 got_sec = sechdrs + mod->arch.got.shndx; in module_frob_arch_sections()
161 plt_sec = sechdrs + mod->arch.plt.shndx; in module_frob_arch_sections()
[all …]
A Dmodule.c106 Elf_Shdr *sechdrs, u32 *location, Elf_Addr v, in apply_r_larch_sop_push_plt_pcrel() argument
112 v = module_emit_plt_entry(mod, sechdrs, v); in apply_r_larch_sop_push_plt_pcrel()
115 v = module_emit_plt_entry(mod, sechdrs, v); in apply_r_larch_sop_push_plt_pcrel()
280 Elf_Shdr *sechdrs, u32 *location, Elf_Addr v, in apply_r_larch_b26() argument
287 v = module_emit_plt_entry(mod, sechdrs, v); in apply_r_larch_b26()
290 v = module_emit_plt_entry(mod, sechdrs, v); in apply_r_larch_b26()
348 Elf_Shdr *sechdrs, u32 *location, Elf_Addr v, in apply_r_larch_got_pc() argument
437 sechdrs[relsec].sh_info); in apply_relocate_add()
442 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr + rel[i].r_offset; in apply_relocate_add()
499 ftrace_plts = (void *)sechdrs->sh_addr; in module_init_ftrace_plt()
[all …]
/linux/arch/x86/kernel/
A Dmodule.c40 int apply_relocate(Elf32_Shdr *sechdrs, in apply_relocate() argument
52 relsec, sechdrs[relsec].sh_info); in apply_relocate()
55 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate()
59 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate()
98 relsec, sechdrs[relsec].sh_info); in __write_relocate_add()
103 loc = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in __write_relocate_add()
108 sym = (Elf64_Sym *)sechdrs[symindex].sh_addr in __write_relocate_add()
201 int apply_relocate_add(Elf64_Shdr *sechdrs, in apply_relocate_add() argument
211 void clear_relocate_add(Elf64_Shdr *sechdrs, in clear_relocate_add() argument
224 const Elf_Shdr *sechdrs, in module_finalize() argument
[all …]
/linux/arch/arc/kernel/
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()
140 unw = unwind_add_table(mod, (void *)sechdrs[unwsec].sh_addr, in module_finalize()
[all …]
/linux/arch/hexagon/kernel/
A Dmodule.c27 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()
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[relsec].sh_addr; in apply_relocate_add()
77 Elf32_Word sym_info = sechdrs[relsec].sh_info; in apply_relocate_add()
78 Elf32_Sym *sym_base = (Elf32_Sym *) sechdrs[symindex].sh_addr; in apply_relocate_add()
[all …]
/linux/kernel/
A Dkexec_file.c108 vfree(pi->sechdrs); in kimage_file_post_load_cleanup()
109 pi->sechdrs = NULL; in kimage_file_post_load_cleanup()
837 const Elf_Shdr *sechdrs; in kexec_purgatory_setup_kbuf() local
901 Elf_Shdr *sechdrs; in kexec_purgatory_setup_sechdrs() local
910 if (!sechdrs) in kexec_purgatory_setup_sechdrs()
913 pi->sechdrs = sechdrs; in kexec_purgatory_setup_sechdrs()
971 const Elf_Shdr *sechdrs; in kexec_apply_relocations() local
980 relsec = sechdrs + i; in kexec_apply_relocations()
1062 vfree(pi->sechdrs); in kexec_load_purgatory()
1063 pi->sechdrs = NULL; in kexec_load_purgatory()
[all …]
/linux/arch/arm64/kernel/
A Dmodule-plts.c298 else if (!strcmp(secstrings + sechdrs[i].sh_name, in module_frob_arch_sections()
300 tramp = sechdrs + i; in module_frob_arch_sections()
301 else if (sechdrs[i].sh_type == SHT_SYMTAB) in module_frob_arch_sections()
302 syms = (Elf64_Sym *)sechdrs[i].sh_addr; in module_frob_arch_sections()
317 Elf64_Shdr *dstsec = sechdrs + sechdrs[i].sh_info; in module_frob_arch_sections()
319 if (sechdrs[i].sh_type != SHT_RELA) in module_frob_arch_sections()
331 sechdrs[i].sh_info); in module_frob_arch_sections()
337 sechdrs[i].sh_info, dstsec); in module_frob_arch_sections()
340 sechdrs[i].sh_info, dstsec); in module_frob_arch_sections()
343 pltsec = sechdrs + mod->arch.core.plt_shndx; in module_frob_arch_sections()
[all …]
A Dmodule.c218 int apply_relocate_add(Elf64_Shdr *sechdrs, in apply_relocate_add() argument
230 Elf64_Rela *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add()
234 loc = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
238 sym = (Elf64_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
364 ovf = reloc_insn_adrp(me, sechdrs, loc, val); in apply_relocate_add()
440 const Elf_Shdr *sechdrs, in module_init_ftrace_plt() argument
447 s = find_section(hdr, sechdrs, ".text.ftrace_trampoline"); in module_init_ftrace_plt()
461 const Elf_Shdr *sechdrs, in module_finalize() argument
465 s = find_section(hdr, sechdrs, ".altinstructions"); in module_finalize()
470 s = find_section(hdr, sechdrs, ".init.eh_frame"); in module_finalize()
[all …]
/linux/arch/sh/kernel/
A Dmodule.c24 int apply_relocate_add(Elf32_Shdr *sechdrs, in apply_relocate_add() argument
31 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add()
38 sechdrs[relsec].sh_info); in apply_relocate_add()
39 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add()
41 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
45 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
91 const Elf_Shdr *sechdrs, in module_finalize() argument
96 ret |= module_dwarf_finalize(hdr, sechdrs, me); in module_finalize()
/linux/arch/microblaze/kernel/
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
/linux/kernel/module/
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()
/linux/arch/loongarch/include/asm/
A Dmodule.h50 Elf_Addr module_emit_got_entry(struct module *mod, Elf_Shdr *sechdrs, Elf_Addr val);
51 Elf_Addr module_emit_plt_entry(struct module *mod, Elf_Shdr *sechdrs, Elf_Addr val);
75 static inline int get_plt_idx(unsigned long val, Elf_Shdr *sechdrs, const struct mod_section *sec) in get_plt_idx() argument
78 struct plt_idx_entry *plt_idx = (struct plt_idx_entry *)sechdrs[sec->shndx].sh_addr; in get_plt_idx()
89 Elf_Shdr *sechdrs, in get_plt_entry() argument
93 int plt_idx = get_plt_idx(val, sechdrs, sec_plt_idx); in get_plt_entry()
94 struct plt_entry *plt = (struct plt_entry *)sechdrs[sec_plt->shndx].sh_addr; in get_plt_entry()
103 Elf_Shdr *sechdrs, in get_got_entry() argument
107 struct got_entry *got = (struct got_entry *)sechdrs[sec->shndx].sh_addr; in get_got_entry()
/linux/arch/parisc/kernel/
A Dmodule.c268 CONST Elf_Shdr *sechdrs, in module_frob_arch_sections() argument
290 if (sechdrs[i].sh_type != SHT_RELA) in module_frob_arch_sections()
310 s = sechdrs[i].sh_info; in module_frob_arch_sections()
514 loc0 = sechdrs[targetsec].sh_addr; in apply_relocate_add()
658 loc0 = sechdrs[targetsec].sh_addr; in apply_relocate_add()
803 const Elf_Shdr *sechdrs) in register_unwind_table() argument
828 const Elf_Shdr *sechdrs, in module_finalize() argument
855 register_unwind_table(me, sechdrs); in module_finalize()
912 for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { in module_finalize()
930 s - sechdrs, me); in module_finalize()
[all …]
/linux/include/linux/
A Dmoduleloader.h21 Elf_Shdr *sechdrs,
48 int apply_relocate(Elf_Shdr *sechdrs,
54 static inline int apply_relocate(Elf_Shdr *sechdrs, in apply_relocate() argument
71 int apply_relocate_add(Elf_Shdr *sechdrs,
87 void clear_relocate_add(Elf_Shdr *sechdrs,
94 static inline int apply_relocate_add(Elf_Shdr *sechdrs, in apply_relocate_add() argument
108 const Elf_Shdr *sechdrs,
/linux/arch/openrisc/kernel/
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()
/linux/arch/nios2/kernel/
A Dmodule.c23 int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, in apply_relocate_add() argument
28 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add()
31 sechdrs[relsec].sh_info); in apply_relocate_add()
33 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { in apply_relocate_add()
37 = ((void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
42 = ((Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
112 int module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, in module_finalize() argument
/linux/arch/riscv/kernel/
A Dmodule-sections.c90 int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, in module_frob_arch_sections() argument
101 if (!strcmp(secstrings + sechdrs[i].sh_name, ".plt")) in module_frob_arch_sections()
102 mod->arch.plt.shdr = sechdrs + i; in module_frob_arch_sections()
103 else if (!strcmp(secstrings + sechdrs[i].sh_name, ".got")) in module_frob_arch_sections()
104 mod->arch.got.shdr = sechdrs + i; in module_frob_arch_sections()
105 else if (!strcmp(secstrings + sechdrs[i].sh_name, ".got.plt")) in module_frob_arch_sections()
106 mod->arch.got_plt.shdr = sechdrs + i; in module_frob_arch_sections()
124 Elf_Rela *relas = (void *)ehdr + sechdrs[i].sh_offset; in module_frob_arch_sections()
125 int num_rela = sechdrs[i].sh_size / sizeof(Elf_Rela); in module_frob_arch_sections()
126 Elf_Shdr *dst_sec = sechdrs + sechdrs[i].sh_info; in module_frob_arch_sections()
[all …]
/linux/arch/arm64/include/asm/
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, in find_section() argument
58 const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; in find_section()
60 for (s = sechdrs, se = sechdrs + hdr->e_shnum; s < se; s++) { in find_section()
/linux/arch/alpha/kernel/
A Dmodule.c64 module_frob_arch_sections(Elf64_Ehdr *hdr, Elf64_Shdr *sechdrs, in module_frob_arch_sections() argument
72 esechdrs = sechdrs + hdr->e_shnum; in module_frob_arch_sections()
78 for (s = sechdrs; s < esechdrs; ++s) in module_frob_arch_sections()
83 me->arch.gotsecindex = s - sechdrs; in module_frob_arch_sections()
110 for (s = sechdrs; s < esechdrs; ++s) in module_frob_arch_sections()
133 apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab, in apply_relocate_add() argument
137 Elf64_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add()
144 sechdrs[relsec].sh_info); in apply_relocate_add()
146 base = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr; in apply_relocate_add()
147 symtab = (Elf64_Sym *)sechdrs[symindex].sh_addr; in apply_relocate_add()
[all …]

Completed in 52 milliseconds

123