/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/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/arch/sh/include/asm/ |
H A D | dwarf.h | 410 #define module_dwarf_finalize(hdr, sechdrs, me) (0)
|
/linux-master/arch/sh/kernel/ |
H A D | dwarf.c | 1089 int module_dwarf_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, argument 1094 char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; 1100 if ((sechdrs[i].sh_flags & SHF_ALLOC) 1101 && !strcmp(secstrings+sechdrs[i].sh_name, ".eh_frame")) { 1102 start = sechdrs[i].sh_addr; 1103 end = start + sechdrs[i].sh_size;
|
/linux-master/arch/xtensa/kernel/ |
H A D | module.c | 47 int apply_relocate_add(Elf32_Shdr *sechdrs, argument 54 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; 60 sechdrs[relsec].sh_info); 62 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { 63 location = (char *)sechdrs[sechdrs[relsec].sh_info].sh_addr 65 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
|
/linux-master/arch/alpha/kernel/ |
H A D | module.c | 64 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/arch/arm/kernel/ |
H A D | module-plts.c | 209 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;
|
H A D | module.c | 110 apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, argument 113 Elf32_Shdr *symsec = sechdrs + symindex; 114 Elf32_Shdr *relsec = sechdrs + relindex; 115 Elf32_Shdr *dstsec = sechdrs + relsec->sh_info; 438 const Elf_Shdr *sechdrs, const char *name) 441 const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; 443 for (s = sechdrs, se = sechdrs + hdr->e_shnum; s < se; s++) 453 int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, argument 458 const char *secstrs = (void *)hdr + sechdrs[hd 437 find_mod_section(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, const char *name) argument [all...] |
H A D | vdso.c | 103 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;
|
/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/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...] |
H A D | module.c | 317 static int reloc_insn_adrp(struct module *mod, Elf64_Shdr *sechdrs, argument 333 val = module_emit_veneer_for_adrp(mod, sechdrs, place, val & ~0xfff); 344 int apply_relocate_add(Elf64_Shdr *sechdrs, argument 356 Elf64_Rela *rel = (void *)sechdrs[relsec].sh_addr; 358 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { 360 loc = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr 364 sym = (Elf64_Sym *)sechdrs[symindex].sh_addr 490 ovf = reloc_insn_adrp(me, sechdrs, loc, val); 533 val = module_emit_plt_entry(me, sechdrs, lo 565 module_init_ftrace_plt(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod) argument 586 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) argument [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
|
/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/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/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...] |
H A D | module.c | 106 Elf_Shdr *sechdrs, u32 *location, Elf_Addr v, 112 v = module_emit_plt_entry(mod, sechdrs, v); 115 v = module_emit_plt_entry(mod, sechdrs, v); 280 Elf_Shdr *sechdrs, u32 *location, Elf_Addr v, 287 v = module_emit_plt_entry(mod, sechdrs, v); 290 v = module_emit_plt_entry(mod, sechdrs, v); 348 Elf_Shdr *sechdrs, u32 *location, Elf_Addr v, 351 Elf_Addr got = module_emit_got_entry(mod, sechdrs, v); 422 int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, argument 434 Elf_Rela *rel = (void *) sechdrs[relse 105 apply_r_larch_sop_push_plt_pcrel(struct module *mod, Elf_Shdr *sechdrs, u32 *location, Elf_Addr v, s64 *rela_stack, size_t *rela_stack_top, unsigned int type) argument 279 apply_r_larch_b26(struct module *mod, Elf_Shdr *sechdrs, u32 *location, Elf_Addr v, s64 *rela_stack, size_t *rela_stack_top, unsigned int type) argument 347 apply_r_larch_got_pc(struct module *mod, Elf_Shdr *sechdrs, u32 *location, Elf_Addr v, s64 *rela_stack, size_t *rela_stack_top, unsigned int type) argument 499 module_init_ftrace_plt(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod) argument 516 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod) argument [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/mips/kernel/ |
H A D | module.c | 313 static int __apply_relocate(Elf_Shdr *sechdrs, const char *strtab, argument 329 sechdrs[relsec].sh_info); 331 r.rel = (void *)sechdrs[relsec].sh_addr; 334 for (i = 0; i < sechdrs[relsec].sh_size / reloc_sz; i++) { 336 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr 339 sym = (Elf_Sym *)sechdrs[symindex].sh_addr 386 int apply_relocate(Elf_Shdr *sechdrs, const char *strtab, argument 390 return __apply_relocate(sechdrs, strtab, symindex, relsec, me, false); 394 int apply_relocate_add(Elf_Shdr *sechdrs, cons argument 424 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) argument [all...] |
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/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/parisc/kernel/ |
H A D | module.c | 280 CONST Elf_Shdr *sechdrs, 294 const Elf_Rela *rels = (void *)sechdrs[i].sh_addr; 295 unsigned long nrels = sechdrs[i].sh_size / sizeof(*rels); 298 if (strncmp(secstrings + sechdrs[i].sh_name, 302 if (sechdrs[i].sh_type != SHT_RELA) 322 s = sechdrs[i].sh_info; 501 int apply_relocate_add(Elf_Shdr *sechdrs, argument 508 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr; 515 unsigned int targetsec = sechdrs[relsec].sh_info; 521 for (i = 0; i < sechdrs[relse 279 module_frob_arch_sections(CONST Elf_Ehdr *hdr, CONST Elf_Shdr *sechdrs, CONST char *secstrings, struct module *me) argument 646 apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, unsigned int symindex, unsigned int relsec, struct module *me) argument 814 register_unwind_table(struct module *me, const Elf_Shdr *sechdrs) argument 839 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/powerpc/kernel/ |
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...] |