/linux-4.1.27/arch/metag/kernel/ |
D | module.c | 86 const Elf32_Shdr *sechdrs, in get_plt_size() argument 98 if ((strstr(secstrings + sechdrs[i].sh_name, ".init") != NULL) in get_plt_size() 103 if (strstr(secstrings + sechdrs[i].sh_name, ".debug") != NULL) in get_plt_size() 106 if (sechdrs[i].sh_type == SHT_RELA) { in get_plt_size() 109 (void *)hdr + sechdrs[i].sh_offset, in get_plt_size() 110 sechdrs[i].sh_size / sizeof(Elf32_Rela)); in get_plt_size() 117 sort((void *)hdr + sechdrs[i].sh_offset, in get_plt_size() 118 sechdrs[i].sh_size / sizeof(Elf32_Rela), in get_plt_size() 122 + sechdrs[i].sh_offset, in get_plt_size() 123 sechdrs[i].sh_size in get_plt_size() [all …]
|
/linux-4.1.27/arch/powerpc/kernel/ |
D | module_64.c | 271 const Elf64_Shdr *sechdrs) in get_stubs_size() argument 279 if (sechdrs[i].sh_type == SHT_RELA) { in get_stubs_size() 282 (void *)sechdrs[i].sh_addr, in get_stubs_size() 283 sechdrs[i].sh_size / sizeof(Elf64_Rela)); in get_stubs_size() 290 sort((void *)sechdrs[i].sh_addr, in get_stubs_size() 291 sechdrs[i].sh_size / sizeof(Elf64_Rela), in get_stubs_size() 294 relocs += count_relocs((void *)sechdrs[i].sh_addr, in get_stubs_size() 295 sechdrs[i].sh_size in get_stubs_size() 343 static Elf64_Sym *find_dot_toc(Elf64_Shdr *sechdrs, in find_dot_toc() argument 350 syms = (Elf64_Sym *)sechdrs[symindex].sh_addr; in find_dot_toc() [all …]
|
D | module_32.c | 100 const Elf32_Shdr *sechdrs, in get_plt_size() argument 112 if ((strstr(secstrings + sechdrs[i].sh_name, ".init") != 0) in get_plt_size() 117 if (strstr(secstrings + sechdrs[i].sh_name, ".debug") != 0) in get_plt_size() 120 if (sechdrs[i].sh_type == SHT_RELA) { in get_plt_size() 123 (void *)hdr + sechdrs[i].sh_offset, in get_plt_size() 124 sechdrs[i].sh_size / sizeof(Elf32_Rela)); in get_plt_size() 131 sort((void *)hdr + sechdrs[i].sh_offset, in get_plt_size() 132 sechdrs[i].sh_size / sizeof(Elf32_Rela), in get_plt_size() 136 + sechdrs[i].sh_offset, in get_plt_size() 137 sechdrs[i].sh_size in get_plt_size() [all …]
|
D | module.c | 33 const Elf_Shdr *sechdrs, in find_section() argument 39 secstrings = (char *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; in find_section() 41 if (strcmp(secstrings+sechdrs[i].sh_name, name) == 0) in find_section() 42 return &sechdrs[i]; in find_section() 47 const Elf_Shdr *sechdrs, struct module *me) in module_finalize() argument 52 sect = find_section(hdr, sechdrs, "__ftr_fixup"); in module_finalize() 58 sect = find_section(hdr, sechdrs, "__mmu_ftr_fixup"); in module_finalize() 65 sect = find_section(hdr, sechdrs, "__fw_ftr_fixup"); in module_finalize() 72 sect = find_section(hdr, sechdrs, "__lwsync_fixup"); in module_finalize()
|
D | vdso.c | 298 Elf32_Shdr *sechdrs; in find_section32() local 303 sechdrs = (void *)ehdr + ehdr->e_shoff; in find_section32() 304 secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset; in find_section32() 308 if (strcmp(secnames+sechdrs[i].sh_name, secname) == 0) { in find_section32() 310 *size = sechdrs[i].sh_size; in find_section32() 311 return (void *)ehdr + sechdrs[i].sh_offset; in find_section32() 389 Elf64_Shdr *sechdrs; in find_section64() local 394 sechdrs = (void *)ehdr + ehdr->e_shoff; in find_section64() 395 secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset; in find_section64() 399 if (strcmp(secnames+sechdrs[i].sh_name, secname) == 0) { in find_section64() [all …]
|
/linux-4.1.27/arch/mips/kernel/ |
D | vpe.c | 183 Elf_Shdr *sechdrs, const char *secstrings) in layout_sections() argument 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 483 Elf_Sym *sym = (void *)sechdrs[symindex].sh_addr; in simplify_symbols() [all …]
|
D | module.c | 195 int apply_relocate(Elf_Shdr *sechdrs, const char *strtab, in apply_relocate() argument 199 Elf_Mips_Rel *rel = (void *) sechdrs[relsec].sh_addr; in apply_relocate() 207 sechdrs[relsec].sh_info); in apply_relocate() 210 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate() 212 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate() 215 sym = (Elf_Sym *)sechdrs[symindex].sh_addr in apply_relocate() 271 const Elf_Shdr *sechdrs, in module_finalize() argument 275 char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; in module_finalize() 281 for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { in module_finalize()
|
D | module-rela.c | 107 int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, in apply_relocate_add() argument 111 Elf_Mips_Rela *rel = (void *) sechdrs[relsec].sh_addr; in apply_relocate_add() 119 sechdrs[relsec].sh_info); in apply_relocate_add() 121 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add() 123 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add() 126 sym = (Elf_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
|
/linux-4.1.27/arch/m68k/kernel/ |
D | module.c | 22 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[relsec].sh_info); in apply_relocate_add() 75 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add() [all …]
|
/linux-4.1.27/arch/sparc/kernel/ |
D | module.c | 55 Elf_Shdr *sechdrs, in module_frob_arch_sections() argument 64 for (symidx = 0; sechdrs[symidx].sh_type != SHT_SYMTAB; symidx++) { in module_frob_arch_sections() 70 sym = (Elf_Sym *)sechdrs[symidx].sh_addr; in module_frob_arch_sections() 71 strtab = (char *)sechdrs[sechdrs[symidx].sh_link].sh_addr; in module_frob_arch_sections() 73 for (i = 1; i < sechdrs[symidx].sh_size / sizeof(Elf_Sym); i++) { in module_frob_arch_sections() 82 int apply_relocate_add(Elf_Shdr *sechdrs, in apply_relocate_add() argument 89 Elf_Rela *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() 94 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add() 98 location = (u8 *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add() 108 sym = (Elf_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add() [all …]
|
/linux-4.1.27/arch/x86/kernel/ |
D | module.c | 99 int apply_relocate(Elf32_Shdr *sechdrs, in apply_relocate() argument 106 Elf32_Rel *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate() 111 relsec, sechdrs[relsec].sh_info); in apply_relocate() 112 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate() 114 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate() 118 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate() 139 int apply_relocate_add(Elf64_Shdr *sechdrs, in apply_relocate_add() argument 146 Elf64_Rela *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() 152 relsec, sechdrs[relsec].sh_info); in apply_relocate_add() 153 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add() [all …]
|
D | machine_kexec_64.c | 407 Elf64_Shdr *sechdrs, unsigned int relsec) in arch_kexec_apply_relocations_add() argument 421 rel = (void *)sechdrs[relsec].sh_offset; in arch_kexec_apply_relocations_add() 424 section = &sechdrs[sechdrs[relsec].sh_info]; in arch_kexec_apply_relocations_add() 427 sechdrs[relsec].sh_info); in arch_kexec_apply_relocations_add() 430 symtabsec = &sechdrs[sechdrs[relsec].sh_link]; in arch_kexec_apply_relocations_add() 440 strtab = (char *)sechdrs[symtabsec->sh_link].sh_offset; in arch_kexec_apply_relocations_add() 443 shstrtab = (char *)sechdrs[ehdr->e_shstrndx].sh_offset; in arch_kexec_apply_relocations_add() 445 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in arch_kexec_apply_relocations_add() 474 name = shstrtab + sechdrs[sym->st_shndx].sh_name; in arch_kexec_apply_relocations_add() 497 sec_base = sechdrs[sym->st_shndx].sh_addr; in arch_kexec_apply_relocations_add()
|
/linux-4.1.27/arch/arc/kernel/ |
D | module.c | 33 int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, in module_frob_arch_sections() argument 43 if (strcmp(secstr+sechdrs[i].sh_name, ".debug_frame") == 0) { in module_frob_arch_sections() 44 sechdrs[i].sh_flags |= SHF_ALLOC; in module_frob_arch_sections() 61 int apply_relocate_add(Elf32_Shdr *sechdrs, in apply_relocate_add() argument 68 Elf32_Rela *rel_entry = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() 75 sec_to_patch = sechdrs[sechdrs[relsec].sh_info].sh_addr; in apply_relocate_add() 76 sym_sec = (Elf32_Sym *) sechdrs[symindex].sh_addr; in apply_relocate_add() 77 n = sechdrs[relsec].sh_size / sizeof(*rel_entry); in apply_relocate_add() 131 int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, in module_finalize() argument 139 unw = unwind_add_table(mod, (void *)sechdrs[unwsec].sh_addr, in module_finalize() [all …]
|
/linux-4.1.27/arch/blackfin/kernel/ |
D | module.c | 21 module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, in module_frob_arch_sections() argument 31 Elf_Shdr *s, *sechdrs_end = sechdrs + hdr->e_shnum; in module_frob_arch_sections() 34 for (s = sechdrs; s < sechdrs_end; ++s) { in module_frob_arch_sections() 151 apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, in apply_relocate_add() argument 156 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() 161 relsec, sechdrs[relsec].sh_info); in apply_relocate_add() 163 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add() 165 location = sechdrs[sechdrs[relsec].sh_info].sh_addr + in apply_relocate_add() 170 sym = (Elf32_Sym *) sechdrs[symindex].sh_addr in apply_relocate_add() 235 const Elf_Shdr * sechdrs, struct module *mod) in module_finalize() argument [all …]
|
/linux-4.1.27/arch/hexagon/kernel/ |
D | module.c | 40 int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, in module_frob_arch_sections() argument 50 secstrings + sechdrs[i].sh_name); in module_frob_arch_sections() 51 if (strcmp(secstrings + sechdrs[i].sh_name, ".plt") == 0) in module_frob_arch_sections() 53 if (strcmp(secstrings + sechdrs[i].sh_name, ".got.plt") == 0) in module_frob_arch_sections() 55 if (strcmp(secstrings + sechdrs[i].sh_name, ".rela.plt") == 0) in module_frob_arch_sections() 80 int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, in apply_relocate_add() argument 88 unsigned int nrelocs = sechdrs[relsec].sh_size / sizeof(Elf32_Rela); in apply_relocate_add() 89 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() 90 Elf32_Word sym_info = sechdrs[relsec].sh_info; in apply_relocate_add() 91 Elf32_Sym *sym_base = (Elf32_Sym *) sechdrs[symindex].sh_addr; in apply_relocate_add() [all …]
|
/linux-4.1.27/arch/sh/kernel/ |
D | module.c | 37 int apply_relocate_add(Elf32_Shdr *sechdrs, in apply_relocate_add() argument 44 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() 51 sechdrs[relsec].sh_info); in apply_relocate_add() 52 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add() 54 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add() 58 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add() 113 const Elf_Shdr *sechdrs, in module_finalize() argument 118 ret |= module_dwarf_finalize(hdr, sechdrs, me); in module_finalize()
|
D | dwarf.c | 1093 int module_dwarf_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, in module_dwarf_finalize() argument 1098 char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; in module_dwarf_finalize() 1104 if ((sechdrs[i].sh_flags & SHF_ALLOC) in module_dwarf_finalize() 1105 && !strcmp(secstrings+sechdrs[i].sh_name, ".eh_frame")) { in module_dwarf_finalize() 1106 start = sechdrs[i].sh_addr; in module_dwarf_finalize() 1107 end = start + sechdrs[i].sh_size; in module_dwarf_finalize()
|
/linux-4.1.27/arch/microblaze/kernel/ |
D | module.c | 21 int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, in apply_relocate_add() argument 26 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() 35 relsec, sechdrs[relsec].sh_info); in apply_relocate_add() 37 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { in apply_relocate_add() 39 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr + in apply_relocate_add() 41 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr + in apply_relocate_add() 120 int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, in module_finalize() argument
|
/linux-4.1.27/arch/openrisc/kernel/ |
D | module.c | 20 int apply_relocate_add(Elf32_Shdr *sechdrs, in apply_relocate_add() argument 27 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() 33 sechdrs[relsec].sh_info); in apply_relocate_add() 34 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add() 36 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add() 41 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
|
/linux-4.1.27/arch/cris/kernel/ |
D | module.c | 45 int apply_relocate_add(Elf32_Shdr *sechdrs, in apply_relocate_add() argument 52 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() 55 sechdrs[relsec].sh_info); in apply_relocate_add() 57 for (i = 0; i < sechdrs[relsec].sh_size / sizeof (*rela); i++) { in apply_relocate_add() 60 = ((void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add() 65 = ((Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
|
/linux-4.1.27/arch/nios2/kernel/ |
D | module.c | 44 int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, in apply_relocate_add() argument 49 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() 52 sechdrs[relsec].sh_info); in apply_relocate_add() 54 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { in apply_relocate_add() 58 = ((void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add() 63 = ((Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add() 133 int module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, in module_finalize() argument
|
/linux-4.1.27/include/linux/ |
D | moduleloader.h | 17 Elf_Shdr *sechdrs, 36 int apply_relocate(Elf_Shdr *sechdrs, 42 static inline int apply_relocate(Elf_Shdr *sechdrs, in apply_relocate() argument 59 int apply_relocate_add(Elf_Shdr *sechdrs, 65 static inline int apply_relocate_add(Elf_Shdr *sechdrs, in apply_relocate_add() argument 79 const Elf_Shdr *sechdrs,
|
D | kexec.h | 122 Elf_Shdr *sechdrs; member
|
D | module.h | 652 const Elf_Shdr *sechdrs, in module_bug_finalize() argument
|
/linux-4.1.27/arch/alpha/kernel/ |
D | module.c | 76 module_frob_arch_sections(Elf64_Ehdr *hdr, Elf64_Shdr *sechdrs, in module_frob_arch_sections() argument 84 esechdrs = sechdrs + hdr->e_shnum; in module_frob_arch_sections() 90 for (s = sechdrs; s < esechdrs; ++s) in module_frob_arch_sections() 95 me->arch.gotsecindex = s - sechdrs; in module_frob_arch_sections() 122 for (s = sechdrs; s < esechdrs; ++s) in module_frob_arch_sections() 145 apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab, in apply_relocate_add() argument 149 Elf64_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() 150 unsigned long i, n = sechdrs[relsec].sh_size / sizeof(*rela); in apply_relocate_add() 156 sechdrs[relsec].sh_info); in apply_relocate_add() 158 base = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr; in apply_relocate_add() [all …]
|
/linux-4.1.27/arch/parisc/kernel/ |
D | module.c | 319 CONST Elf_Shdr *sechdrs, in module_frob_arch_sections() argument 332 const Elf_Rela *rels = (void *)sechdrs[i].sh_addr; in module_frob_arch_sections() 333 unsigned long nrels = sechdrs[i].sh_size / sizeof(*rels); in module_frob_arch_sections() 336 if (strncmp(secstrings + sechdrs[i].sh_name, in module_frob_arch_sections() 340 if (sechdrs[i].sh_type != SHT_RELA) in module_frob_arch_sections() 360 s = sechdrs[i].sh_info; in module_frob_arch_sections() 538 int apply_relocate_add(Elf_Shdr *sechdrs, in apply_relocate_add() argument 545 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() 552 unsigned int targetsec = sechdrs[relsec].sh_info; in apply_relocate_add() 558 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add() [all …]
|
/linux-4.1.27/arch/c6x/kernel/ |
D | module.c | 45 int apply_relocate_add(Elf32_Shdr *sechdrs, in apply_relocate_add() argument 51 Elf32_Rela *rel = (void *) sechdrs[relsec].sh_addr; in apply_relocate_add() 59 relsec, sechdrs[relsec].sh_info, offset); in apply_relocate_add() 61 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add() 63 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add() 68 sym = (Elf_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
|
/linux-4.1.27/arch/mn10300/kernel/ |
D | module.c | 56 int apply_relocate_add(Elf32_Shdr *sechdrs, in apply_relocate_add() argument 63 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() 70 relsec, sechdrs[relsec].sh_info); in apply_relocate_add() 72 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add() 74 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add() 79 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
|
/linux-4.1.27/arch/arm/kernel/ |
D | module.c | 50 apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, in apply_relocate() argument 53 Elf32_Shdr *symsec = sechdrs + symindex; in apply_relocate() 54 Elf32_Shdr *relsec = sechdrs + relindex; in apply_relocate() 55 Elf32_Shdr *dstsec = sechdrs + relsec->sh_info; in apply_relocate() 278 const Elf_Shdr *sechdrs, const char *name) in find_mod_section() argument 281 const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; in find_mod_section() 283 for (s = sechdrs, se = sechdrs + hdr->e_shnum; s < se; s++) in find_mod_section() 293 int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, in module_finalize() argument 298 const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; in module_finalize() 299 const Elf_Shdr *sechdrs_end = sechdrs + hdr->e_shnum; in module_finalize() [all …]
|
D | vdso.c | 102 Elf32_Shdr *sechdrs; in find_section() local 107 sechdrs = (void *)ehdr + ehdr->e_shoff; in find_section() 108 secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset; in find_section() 112 if (strcmp(secnames + sechdrs[i].sh_name, name) == 0) { in find_section() 114 *size = sechdrs[i].sh_size; in find_section() 115 return (void *)ehdr + sechdrs[i].sh_offset; in find_section()
|
/linux-4.1.27/kernel/ |
D | kexec.c | 430 arch_kexec_apply_relocations_add(const Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, in arch_kexec_apply_relocations_add() argument 439 arch_kexec_apply_relocations(const Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, in arch_kexec_apply_relocations() argument 467 vfree(pi->sechdrs); in kimage_file_post_load_cleanup() 468 pi->sechdrs = NULL; in kimage_file_post_load_cleanup() 2303 Elf_Shdr *sechdrs = NULL; in __kexec_load_purgatory() local 2319 sechdrs = vzalloc(pi->ehdr->e_shnum * sizeof(Elf_Shdr)); in __kexec_load_purgatory() 2320 if (!sechdrs) in __kexec_load_purgatory() 2323 memcpy(sechdrs, sechdrs_c, pi->ehdr->e_shnum * sizeof(Elf_Shdr)); in __kexec_load_purgatory() 2340 if (sechdrs[i].sh_type == SHT_NOBITS) in __kexec_load_purgatory() 2343 sechdrs[i].sh_offset = (unsigned long)pi->ehdr + in __kexec_load_purgatory() [all …]
|
D | module.c | 175 Elf_Shdr *sechdrs; member 226 Elf_Shdr *shdr = &info->sechdrs[i]; in find_sec() 239 return (void *)info->sechdrs[find_sec(info, name)].sh_addr; in section_addr() 251 *num = info->sechdrs[sec].sh_size / object_size; in section_objs() 252 return (void *)info->sechdrs[sec].sh_addr; in section_objs() 487 Elf_Shdr *pcpusec = &info->sechdrs[info->index.pcpu]; in percpu_modalloc() 573 if (info->sechdrs[info->index.pcpu].sh_size != 0) in percpu_modalloc() 1131 static int check_version(Elf_Shdr *sechdrs, in check_version() argument 1149 versions = (void *) sechdrs[versindex].sh_addr; in check_version() 1150 num_versions = sechdrs[versindex].sh_size in check_version() [all …]
|
/linux-4.1.27/arch/xtensa/kernel/ |
D | module.c | 49 int apply_relocate_add(Elf32_Shdr *sechdrs, in apply_relocate_add() argument 56 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() 63 sechdrs[relsec].sh_info); in apply_relocate_add() 65 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { in apply_relocate_add() 66 location = (char *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add() 68 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
|
/linux-4.1.27/arch/avr32/kernel/ |
D | module.c | 60 int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, in module_frob_arch_sections() argument 73 switch (sechdrs[i].sh_type) { in module_frob_arch_sections() 75 symtab = &sechdrs[i]; in module_frob_arch_sections() 91 strings = (void *)hdr + sechdrs[symtab->sh_link].sh_offset; in module_frob_arch_sections() 105 if (sechdrs[i].sh_type != SHT_RELA) in module_frob_arch_sections() 107 nrela = sechdrs[i].sh_size / sizeof(Elf32_Rela); in module_frob_arch_sections() 108 rela = (void *)hdr + sechdrs[i].sh_offset; in module_frob_arch_sections() 145 int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, in apply_relocate_add() argument 149 Elf32_Shdr *symsec = sechdrs + symindex; in apply_relocate_add() 150 Elf32_Shdr *relsec = sechdrs + relindex; in apply_relocate_add() [all …]
|
/linux-4.1.27/arch/s390/kernel/ |
D | module.c | 107 int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, in module_frob_arch_sections() argument 119 switch (sechdrs[i].sh_type) { in module_frob_arch_sections() 121 symtab = sechdrs + i; in module_frob_arch_sections() 136 strings = (void *) hdr + sechdrs[symtab->sh_link].sh_offset; in module_frob_arch_sections() 152 if (sechdrs[i].sh_type != SHT_RELA) in module_frob_arch_sections() 154 nrela = sechdrs[i].sh_size / sizeof(Elf_Rela); in module_frob_arch_sections() 155 rela = (void *) hdr + sechdrs[i].sh_offset; in module_frob_arch_sections() 398 int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, in apply_relocate_add() argument 409 relsec, sechdrs[relsec].sh_info); in apply_relocate_add() 410 base = sechdrs[sechdrs[relsec].sh_info].sh_addr; in apply_relocate_add() [all …]
|
/linux-4.1.27/scripts/mod/ |
D | modpost.c | 409 Elf_Shdr *sechdrs; in parse_elf() local 451 sechdrs = (void *)hdr + hdr->e_shoff; in parse_elf() 452 info->sechdrs = sechdrs; in parse_elf() 467 info->num_sections = TO_NATIVE(sechdrs[0].sh_size); in parse_elf() 473 info->secindex_strings = TO_NATIVE(sechdrs[0].sh_link); in parse_elf() 481 sechdrs[i].sh_name = TO_NATIVE(sechdrs[i].sh_name); in parse_elf() 482 sechdrs[i].sh_type = TO_NATIVE(sechdrs[i].sh_type); in parse_elf() 483 sechdrs[i].sh_flags = TO_NATIVE(sechdrs[i].sh_flags); in parse_elf() 484 sechdrs[i].sh_addr = TO_NATIVE(sechdrs[i].sh_addr); in parse_elf() 485 sechdrs[i].sh_offset = TO_NATIVE(sechdrs[i].sh_offset); in parse_elf() [all …]
|
D | modpost.h | 122 Elf_Shdr *sechdrs; member
|
D | file2alias.c | 1261 if (info->sechdrs[get_secindex(info, sym)].sh_type & SHT_NOBITS) { in handle_moddevtable() 1266 + info->sechdrs[get_secindex(info, sym)].sh_offset in handle_moddevtable()
|
/linux-4.1.27/arch/tile/kernel/ |
D | module.c | 122 int apply_relocate_add(Elf_Shdr *sechdrs, in apply_relocate_add() argument 129 Elf_Rela *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() 135 sechdrs[relsec].sh_info); in apply_relocate_add() 136 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add() 138 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add() 144 sym = (Elf_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
|
/linux-4.1.27/arch/m32r/kernel/ |
D | module.c | 71 int apply_relocate_add(Elf32_Shdr *sechdrs, in apply_relocate_add() argument 78 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() 89 sechdrs[relsec].sh_info); in apply_relocate_add() 90 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add() 92 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add() 96 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
|
/linux-4.1.27/arch/arm64/kernel/ |
D | module.c | 196 int apply_relocate_add(Elf64_Shdr *sechdrs, in apply_relocate_add() argument 208 Elf64_Rela *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add() 210 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add() 212 loc = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add() 216 sym = (Elf64_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add() 403 const Elf_Shdr *sechdrs, in module_finalize() argument 407 const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; in module_finalize() 409 for (s = sechdrs, se = sechdrs + hdr->e_shnum; s < se; s++) { in module_finalize()
|
/linux-4.1.27/lib/ |
D | bug.c | 85 void module_bug_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, in module_bug_finalize() argument 95 secstrings = (char *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; in module_bug_finalize() 97 if (strcmp(secstrings+sechdrs[i].sh_name, "__bug_table")) in module_bug_finalize() 99 mod->bug_table = (void *) sechdrs[i].sh_addr; in module_bug_finalize() 100 mod->num_bugs = sechdrs[i].sh_size / sizeof(struct bug_entry); in module_bug_finalize()
|
/linux-4.1.27/arch/unicore32/kernel/ |
D | module.c | 33 apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, in apply_relocate() argument 36 Elf32_Shdr *symsec = sechdrs + symindex; in apply_relocate() 37 Elf32_Shdr *relsec = sechdrs + relindex; in apply_relocate() 38 Elf32_Shdr *dstsec = sechdrs + relsec->sh_info; in apply_relocate()
|
/linux-4.1.27/arch/score/kernel/ |
D | module.c | 30 int apply_relocate(Elf_Shdr *sechdrs, const char *strtab, in apply_relocate() argument 34 Elf32_Shdr *symsec = sechdrs + symindex; in apply_relocate() 35 Elf32_Shdr *relsec = sechdrs + relindex; in apply_relocate() 36 Elf32_Shdr *dstsec = sechdrs + relsec->sh_info; in apply_relocate()
|
/linux-4.1.27/arch/ia64/kernel/ |
D | module.c | 421 module_frob_arch_sections (Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, char *secstrings, in module_frob_arch_sections() argument 425 Elf64_Shdr *s, *sechdrs_end = sechdrs + ehdr->e_shnum; in module_frob_arch_sections() 431 for (s = sechdrs; s < sechdrs_end; ++s) in module_frob_arch_sections() 457 for (s = sechdrs + 1; s < sechdrs_end; ++s) { in module_frob_arch_sections() 795 apply_relocate_add (Elf64_Shdr *sechdrs, const char *strtab, unsigned int symindex, in apply_relocate_add() argument 798 unsigned int i, n = sechdrs[relsec].sh_size / sizeof(Elf64_Rela); in apply_relocate_add() 799 Elf64_Rela *rela = (void *) sechdrs[relsec].sh_addr; in apply_relocate_add() 804 relsec, n, sechdrs[relsec].sh_info); in apply_relocate_add() 806 target_sec = sechdrs + sechdrs[relsec].sh_info; in apply_relocate_add() 836 ((Elf64_Sym *) sechdrs[symindex].sh_addr in apply_relocate_add() [all …]
|
/linux-4.1.27/arch/sh/include/asm/ |
D | dwarf.h | 414 #define module_dwarf_finalize(hdr, sechdrs, me) (0) argument
|