Home
last modified time | relevance | path

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

12

/linux/arch/powerpc/kernel/
A Dmodule_64.c212 sechdrs[i].sh_size in get_stubs_size()
281 Elf64_Shdr *sechdrs, in module_frob_arch_sections() argument
295 sechdrs[i].sh_addralign = 8; in module_frob_arch_sections()
299 sechdrs[i].sh_size); in module_frob_arch_sections()
309 + sechdrs[sechdrs[i].sh_link].sh_offset); in module_frob_arch_sections()
325 sechdrs[me->arch.stubs_section].sh_size = get_stubs_size(hdr, sechdrs); in module_frob_arch_sections()
553 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
584 value -= my_r2(sechdrs, me); in apply_relocate_add()
597 value -= my_r2(sechdrs, me); in apply_relocate_add()
605 value -= my_r2(sechdrs, me); in apply_relocate_add()
[all …]
A Dmodule_32.c73 const Elf32_Shdr *sechdrs, in get_plt_size() argument
93 if (sechdrs[i].sh_type == SHT_RELA) { in get_plt_size()
104 sort((void *)hdr + sechdrs[i].sh_offset, in get_plt_size()
109 + sechdrs[i].sh_offset, in get_plt_size()
110 sechdrs[i].sh_size in get_plt_size()
120 Elf32_Shdr *sechdrs, in module_frob_arch_sections() argument
158 const Elf32_Shdr *sechdrs, in do_plt_call() argument
199 sechdrs[relsec].sh_info); in apply_relocate_add()
202 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
239 sechdrs, module); in apply_relocate_add()
[all …]
A Dmodule.c23 const Elf_Shdr *sechdrs, in find_section() argument
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() argument
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, ".opd"); in module_finalize()
76 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()
442 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocations()
491 bssbase = sechdrs[i].sh_addr; in simplify_symbols()
579 Elf_Shdr *sechdrs; in vpe_elfload() local
614 sechdrs[0].sh_addr = 0; in vpe_elfload()
622 (len < sechdrs[i].sh_offset + sechdrs[i].sh_size)) { in vpe_elfload()
631 sechdrs[i].sh_offset; in vpe_elfload()
661 sechdrs[i].sh_size); in vpe_elfload()
667 sechdrs[i].sh_addr); in vpe_elfload()
[all …]
A Dmodule.c313 static int __apply_relocate(Elf_Shdr *sechdrs, const char *strtab, in __apply_relocate() argument
329 sechdrs[relsec].sh_info); in __apply_relocate()
331 r.rel = (void *)sechdrs[relsec].sh_addr; in __apply_relocate()
334 for (i = 0; i < sechdrs[relsec].sh_size / reloc_sz; i++) { in __apply_relocate()
336 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in __apply_relocate()
339 sym = (Elf_Sym *)sechdrs[symindex].sh_addr in __apply_relocate()
386 int apply_relocate(Elf_Shdr *sechdrs, const char *strtab, in apply_relocate() argument
394 int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, in apply_relocate_add() argument
425 const Elf_Shdr *sechdrs, in module_finalize() argument
429 char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; in module_finalize()
[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/sparc/kernel/
A Dmodule.c56 Elf_Shdr *sechdrs, in module_frob_arch_sections() argument
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()
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()
99 location = (u8 *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
109 sym = (Elf_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
185 const Elf_Shdr *sechdrs) in do_patch_sections() argument
190 for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { in do_patch_sections()
208 const Elf_Shdr *sechdrs, in module_finalize() argument
[all …]
/linux/arch/x86/kernel/
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()
104 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate()
108 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate()
144 relsec, sechdrs[relsec].sh_info); in __apply_relocate_add()
147 loc = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in __apply_relocate_add()
152 sym = (Elf64_Sym *)sechdrs[symindex].sh_addr in __apply_relocate_add()
221 int apply_relocate_add(Elf64_Shdr *sechdrs, in apply_relocate_add() argument
250 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/arm64/kernel/
A Dmodule-plts.c308 else if (!strcmp(secstrings + sechdrs[i].sh_name, in module_frob_arch_sections()
310 tramp = sechdrs + i; in module_frob_arch_sections()
311 else if (sechdrs[i].sh_type == SHT_SYMTAB) in module_frob_arch_sections()
312 syms = (Elf64_Sym *)sechdrs[i].sh_addr; in module_frob_arch_sections()
327 Elf64_Shdr *dstsec = sechdrs + sechdrs[i].sh_info; in module_frob_arch_sections()
329 if (sechdrs[i].sh_type != SHT_RELA) in module_frob_arch_sections()
341 sechdrs[i].sh_info); in module_frob_arch_sections()
347 sechdrs[i].sh_info, dstsec); in module_frob_arch_sections()
350 sechdrs[i].sh_info, dstsec); in module_frob_arch_sections()
353 pltsec = sechdrs + mod->arch.core.plt_shndx; in module_frob_arch_sections()
[all …]
A Dmodule.c260 int apply_relocate_add(Elf64_Shdr *sechdrs, in apply_relocate_add() argument
272 Elf64_Rela *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add()
276 loc = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
280 sym = (Elf64_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
406 ovf = reloc_insn_adrp(me, sechdrs, loc, val); in apply_relocate_add()
479 const Elf_Shdr *sechdrs, in find_section() argument
485 for (s = sechdrs, se = sechdrs + hdr->e_shnum; s < se; s++) { in find_section()
499 const Elf_Shdr *sechdrs, in module_init_ftrace_plt() argument
523 const Elf_Shdr *sechdrs, in module_finalize() argument
527 s = find_section(hdr, sechdrs, ".altinstructions"); 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.c166 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
909 Elf_Shdr *sechdrs; in kexec_purgatory_setup_sechdrs() local
917 if (!sechdrs) in kexec_purgatory_setup_sechdrs()
921 pi->sechdrs = sechdrs; in kexec_purgatory_setup_sechdrs()
967 const Elf_Shdr *sechdrs; in kexec_apply_relocations() local
976 relsec = sechdrs + i; in kexec_apply_relocations()
1058 vfree(pi->sechdrs); in kexec_load_purgatory()
1059 pi->sechdrs = NULL; in kexec_load_purgatory()
[all …]
/linux/arch/parisc/kernel/
A Dmodule.c299 CONST Elf_Shdr *sechdrs, in module_frob_arch_sections() argument
320 if (sechdrs[i].sh_type != SHT_RELA) in module_frob_arch_sections()
340 s = sechdrs[i].sh_info; in module_frob_arch_sections()
543 loc0 = sechdrs[targetsec].sh_addr; in apply_relocate_add()
687 loc0 = sechdrs[targetsec].sh_addr; in apply_relocate_add()
832 const Elf_Shdr *sechdrs) in register_unwind_table() argument
857 const Elf_Shdr *sechdrs, in module_finalize() argument
884 register_unwind_table(me, sechdrs); in module_finalize()
941 for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { in module_finalize()
959 s - sechdrs, me); 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/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/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.c43 int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, in apply_relocate_add() argument
48 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add()
51 sechdrs[relsec].sh_info); in apply_relocate_add()
53 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { in apply_relocate_add()
57 = ((void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
62 = ((Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
132 int module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, in module_finalize() argument
/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 …]
/linux/arch/h8300/kernel/
A Dmodule.c9 int apply_relocate_add(Elf32_Shdr *sechdrs, in apply_relocate_add() argument
16 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add()
19 sechdrs[relsec].sh_info); in apply_relocate_add()
20 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { in apply_relocate_add()
23 (uint32_t *)(sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
27 Elf32_Sym *sym = (Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
/linux/include/linux/
A Dmoduleloader.h18 Elf_Shdr *sechdrs,
47 int apply_relocate(Elf_Shdr *sechdrs,
53 static inline int apply_relocate(Elf_Shdr *sechdrs, in apply_relocate() argument
70 int apply_relocate_add(Elf_Shdr *sechdrs,
76 static inline int apply_relocate_add(Elf_Shdr *sechdrs, in apply_relocate_add() argument
90 const Elf_Shdr *sechdrs,
/linux/arch/s390/kernel/
A Dmodule.c132 switch (sechdrs[i].sh_type) { in module_frob_arch_sections()
134 symtab = sechdrs + i; in module_frob_arch_sections()
165 if (sechdrs[i].sh_type != SHT_RELA) in module_frob_arch_sections()
167 nrela = sechdrs[i].sh_size / sizeof(Elf_Rela); in module_frob_arch_sections()
168 rela = (void *) hdr + sechdrs[i].sh_offset; in module_frob_arch_sections()
451 relsec, sechdrs[relsec].sh_info); in __apply_relocate_add()
452 base = sechdrs[sechdrs[relsec].sh_info].sh_addr; in __apply_relocate_add()
453 symtab = (Elf_Sym *) sechdrs[symindex].sh_addr; in __apply_relocate_add()
454 rela = (Elf_Rela *) sechdrs[relsec].sh_addr; in __apply_relocate_add()
504 const Elf_Shdr *sechdrs, in module_finalize() argument
[all …]
/linux/arch/xtensa/kernel/
A Dmodule.c47 int apply_relocate_add(Elf32_Shdr *sechdrs, in apply_relocate_add() argument
54 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add()
60 sechdrs[relsec].sh_info); in apply_relocate_add()
62 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { in apply_relocate_add()
63 location = (char *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
65 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
/linux/arch/arm/kernel/
A Dmodule.c75 Elf32_Shdr *symsec = sechdrs + symindex; in apply_relocate()
76 Elf32_Shdr *relsec = sechdrs + relindex; in apply_relocate()
77 Elf32_Shdr *dstsec = sechdrs + relsec->sh_info; in apply_relocate()
350 const Elf_Shdr *sechdrs, const char *name) in find_mod_section() argument
353 const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; in find_mod_section()
355 for (s = sechdrs, se = sechdrs + hdr->e_shnum; s < se; s++) in find_mod_section()
365 int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, in module_finalize() argument
371 const Elf_Shdr *sechdrs_end = sechdrs + hdr->e_shnum; in module_finalize()
377 for (s = sechdrs; s < sechdrs_end; s++) { in module_finalize()
414 s = find_mod_section(hdr, sechdrs, ".pv_table"); in module_finalize()
[all …]

Completed in 29 milliseconds

12