/linux-master/kernel/module/ |
H A D | debug_kmemleak.c | 22 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);
|
H A D | livepatch.c | 33 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 D | version.c | 18 Elf_Shdr *sechdrs = info->sechdrs; local 31 versions = (void *)sechdrs[versindex].sh_addr; 32 num_versions = sechdrs[versindex].sh_size
|
/linux-master/arch/m68k/kernel/ |
H A D | module.c | 22 int apply_relocate(Elf32_Shdr *sechdrs, argument 29 Elf32_Rel *rel = (void *)sechdrs[relsec].sh_addr; 34 sechdrs[relsec].sh_info); 35 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { 37 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr 41 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr 62 int apply_relocate_add(Elf32_Shdr *sechdrs, argument 69 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr; 74 sechdrs[relse 102 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod) argument [all...] |
/linux-master/arch/openrisc/kernel/ |
H A D | module.c | 16 int apply_relocate_add(Elf32_Shdr *sechdrs, argument 23 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr; 29 sechdrs[relsec].sh_info); 30 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { 32 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr 37 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
|
/linux-master/include/linux/ |
H A D | moduleloader.h | 21 Elf_Shdr *sechdrs, 55 int apply_relocate(Elf_Shdr *sechdrs, 61 static inline int apply_relocate(Elf_Shdr *sechdrs, 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, argument 115 const Elf_Shdr *sechdrs,
|
H A D | cfi.h | 40 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/hexagon/kernel/ |
H A D | module.c | 23 * @sechdrs - pointer to elf load section headers 27 int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, argument 37 secstrings + sechdrs[i].sh_name); 38 if (strcmp(secstrings + sechdrs[i].sh_name, ".plt") == 0) 40 if (strcmp(secstrings + sechdrs[i].sh_name, ".got.plt") == 0) 42 if (strcmp(secstrings + sechdrs[i].sh_name, ".rela.plt") == 0) 59 * @sechdrs - pointer to section headers 67 int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, argument 75 unsigned int nrelocs = sechdrs[relsec].sh_size / sizeof(Elf32_Rela); 76 Elf32_Rela *rela = (void *)sechdrs[relse [all...] |
/linux-master/arch/microblaze/kernel/ |
H A D | module.c | 18 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
|
/linux-master/arch/arm64/include/asm/ |
H A D | module.h | 24 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/powerpc/kernel/ |
H A D | module_32.c | 74 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...] |
H A D | module_64.c | 208 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 D | module.c | 23 const Elf_Shdr *sechdrs, 29 secstrings = (char *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; 31 if (strcmp(secstrings+sechdrs[i].sh_name, name) == 0) 32 return &sechdrs[i]; 37 const Elf_Shdr *sechdrs, struct module *me) 42 rc = module_finalize_ftrace(me, sechdrs); 47 sect = find_section(hdr, sechdrs, "__ftr_fixup"); 53 sect = find_section(hdr, sechdrs, "__mmu_ftr_fixup"); 60 sect = find_section(hdr, sechdrs, "__fw_ftr_fixup"); 68 sect = find_section(hdr, sechdrs, " 22 find_section(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, const char *name) argument 36 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) argument [all...] |
/linux-master/arch/loongarch/kernel/ |
H A D | module-sections.c | 12 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/arc/kernel/ |
H A D | module.c | 26 int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, argument 45 int apply_relocate_add(Elf32_Shdr *sechdrs, argument 52 Elf32_Rela *rel_entry = (void *)sechdrs[relsec].sh_addr; 61 tgtsec = sechdrs[relsec].sh_info; 62 tgt_addr = sechdrs[tgtsec].sh_addr; 63 sym_sec = (Elf32_Sym *) sechdrs[symindex].sh_addr; 64 n = sechdrs[relsec].sh_size / sizeof(*rel_entry); 67 module->arch.secstr + sechdrs[tgtsec].sh_name, tgt_addr); 86 s = module->arch.secstr + sechdrs[sym_entry->st_shndx].sh_name; 114 if (strcmp(module->arch.secstr+sechdrs[tgtse 132 module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod) argument [all...] |
/linux-master/arch/sh/kernel/ |
H A D | module.c | 24 int apply_relocate_add(Elf32_Shdr *sechdrs, argument 31 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr; 38 sechdrs[relsec].sh_info); 39 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { 41 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr 45 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr 91 const Elf_Shdr *sechdrs, 96 ret |= module_dwarf_finalize(hdr, sechdrs, me); 90 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) argument
|
/linux-master/arch/loongarch/include/asm/ |
H A D | module.h | 50 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) argument 78 struct plt_idx_entry *plt_idx = (struct plt_idx_entry *)sechdrs[sec->shndx].sh_addr; 89 Elf_Shdr *sechdrs, 93 int plt_idx = get_plt_idx(val, sechdrs, sec_plt_idx); 94 struct plt_entry *plt = (struct plt_entry *)sechdrs[sec_plt->shndx].sh_addr; 103 Elf_Shdr *sechdrs, 107 struct got_entry *got = (struct got_entry *)sechdrs[sec->shndx].sh_addr; 88 get_plt_entry(unsigned long val, Elf_Shdr *sechdrs, const struct mod_section *sec_plt, const struct mod_section *sec_plt_idx) argument 102 get_got_entry(Elf_Addr val, Elf_Shdr *sechdrs, const struct mod_section *sec) argument
|
/linux-master/kernel/ |
H A D | cfi.c | 48 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/x86/kernel/ |
H A D | module.c | 91 int apply_relocate(Elf32_Shdr *sechdrs, argument 98 Elf32_Rel *rel = (void *)sechdrs[relsec].sh_addr; 103 relsec, sechdrs[relsec].sh_info); 104 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { 106 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr 110 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr 132 static int __write_relocate_add(Elf64_Shdr *sechdrs, argument 141 Elf64_Rela *rel = (void *)sechdrs[relsec].sh_addr; 149 relsec, sechdrs[relse 225 write_relocate_add(Elf64_Shdr *sechdrs, const char *strtab, unsigned int symindex, unsigned int relsec, struct module *me, bool apply) argument 252 apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab, unsigned int symindex, unsigned int relsec, struct module *me) argument 262 clear_relocate_add(Elf64_Shdr *sechdrs, const char *strtab, unsigned int symindex, unsigned int relsec, struct module *me) argument 274 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) argument [all...] |
/linux-master/arch/nios2/kernel/ |
H A D | module.c | 43 int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, argument 48 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; 51 sechdrs[relsec].sh_info); 53 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { 57 = ((void *)sechdrs[sechdrs[relsec].sh_info].sh_addr 62 = ((Elf32_Sym *)sechdrs[symindex].sh_addr 132 int module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, argument
|
/linux-master/arch/sparc/kernel/ |
H A D | module.c | 56 Elf_Shdr *sechdrs, 65 for (symidx = 0; sechdrs[symidx].sh_type != SHT_SYMTAB; symidx++) { 71 sym = (Elf_Sym *)sechdrs[symidx].sh_addr; 72 strtab = (char *)sechdrs[sechdrs[symidx].sh_link].sh_addr; 74 for (i = 1; i < sechdrs[symidx].sh_size / sizeof(Elf_Sym); i++) { 83 int apply_relocate_add(Elf_Shdr *sechdrs, argument 90 Elf_Rela *rel = (void *)sechdrs[relsec].sh_addr; 95 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { 99 location = (u8 *)sechdrs[sechdr 55 module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, char *secstrings, struct module *mod) argument 184 do_patch_sections(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs) argument 207 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) argument [all...] |
/linux-master/arch/powerpc/include/asm/ |
H A D | module.h | 80 int module_finalize_ftrace(struct module *mod, const Elf_Shdr *sechdrs); 82 static inline int module_finalize_ftrace(struct module *mod, const Elf_Shdr *sechdrs) argument
|
/linux-master/arch/arm64/kernel/ |
H A D | module-plts.c | 69 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/mips/kernel/ |
H A D | vpe.c | 183 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/arch/csky/kernel/ |
H A D | module.c | 49 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
|