Home
last modified time | relevance | path

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

/linux-4.4.14/arch/metag/kernel/
Dmodule.c86 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.4.14/arch/powerpc/kernel/
Dmodule_64.c271 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 …]
Dmodule_32.c100 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 …]
Dmodule.c33 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()
Dvdso.c258 Elf32_Shdr *sechdrs; in find_section32() local
263 sechdrs = (void *)ehdr + ehdr->e_shoff; in find_section32()
264 secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset; in find_section32()
268 if (strcmp(secnames+sechdrs[i].sh_name, secname) == 0) { in find_section32()
270 *size = sechdrs[i].sh_size; in find_section32()
271 return (void *)ehdr + sechdrs[i].sh_offset; in find_section32()
363 Elf64_Shdr *sechdrs; in find_section64() local
368 sechdrs = (void *)ehdr + ehdr->e_shoff; in find_section64()
369 secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset; in find_section64()
373 if (strcmp(secnames+sechdrs[i].sh_name, secname) == 0) { in find_section64()
[all …]
/linux-4.4.14/arch/mips/kernel/
Dvpe.c183 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 …]
Dmodule.c195 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()
Dmodule-rela.c107 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.4.14/kernel/
Dkexec_file.c120 arch_kexec_apply_relocations_add(const Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, in arch_kexec_apply_relocations_add() argument
129 arch_kexec_apply_relocations(const Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, in arch_kexec_apply_relocations() argument
157 vfree(pi->sechdrs); in kimage_file_post_load_cleanup()
158 pi->sechdrs = NULL; in kimage_file_post_load_cleanup()
671 Elf_Shdr *sechdrs = NULL; in __kexec_load_purgatory() local
687 sechdrs = vzalloc(pi->ehdr->e_shnum * sizeof(Elf_Shdr)); in __kexec_load_purgatory()
688 if (!sechdrs) in __kexec_load_purgatory()
691 memcpy(sechdrs, sechdrs_c, pi->ehdr->e_shnum * sizeof(Elf_Shdr)); in __kexec_load_purgatory()
708 if (sechdrs[i].sh_type == SHT_NOBITS) in __kexec_load_purgatory()
711 sechdrs[i].sh_offset = (unsigned long)pi->ehdr + in __kexec_load_purgatory()
[all …]
Dmodule.c324 Elf_Shdr *sechdrs; member
375 Elf_Shdr *shdr = &info->sechdrs[i]; in find_sec()
388 return (void *)info->sechdrs[find_sec(info, name)].sh_addr; in section_addr()
400 *num = info->sechdrs[sec].sh_size / object_size; in section_objs()
401 return (void *)info->sechdrs[sec].sh_addr; in section_objs()
644 Elf_Shdr *pcpusec = &info->sechdrs[info->index.pcpu]; in percpu_modalloc()
730 if (info->sechdrs[info->index.pcpu].sh_size != 0) in percpu_modalloc()
1288 static int check_version(Elf_Shdr *sechdrs, in check_version() argument
1306 versions = (void *) sechdrs[versindex].sh_addr; in check_version()
1307 num_versions = sechdrs[versindex].sh_size in check_version()
[all …]
/linux-4.4.14/arch/m68k/kernel/
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()
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.4.14/arch/sparc/kernel/
Dmodule.c55 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.4.14/arch/x86/kernel/
Dmodule.c99 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 …]
Dmachine_kexec_64.c409 Elf64_Shdr *sechdrs, unsigned int relsec) in arch_kexec_apply_relocations_add() argument
423 rel = (void *)sechdrs[relsec].sh_offset; in arch_kexec_apply_relocations_add()
426 section = &sechdrs[sechdrs[relsec].sh_info]; in arch_kexec_apply_relocations_add()
429 sechdrs[relsec].sh_info); in arch_kexec_apply_relocations_add()
432 symtabsec = &sechdrs[sechdrs[relsec].sh_link]; in arch_kexec_apply_relocations_add()
442 strtab = (char *)sechdrs[symtabsec->sh_link].sh_offset; in arch_kexec_apply_relocations_add()
445 shstrtab = (char *)sechdrs[ehdr->e_shstrndx].sh_offset; in arch_kexec_apply_relocations_add()
447 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in arch_kexec_apply_relocations_add()
476 name = shstrtab + sechdrs[sym->st_shndx].sh_name; in arch_kexec_apply_relocations_add()
499 sec_base = sechdrs[sym->st_shndx].sh_addr; in arch_kexec_apply_relocations_add()
/linux-4.4.14/arch/arc/kernel/
Dmodule.c33 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.4.14/arch/blackfin/kernel/
Dmodule.c21 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.4.14/arch/hexagon/kernel/
Dmodule.c40 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.4.14/arch/sh/kernel/
Dmodule.c37 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()
Ddwarf.c1093 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.4.14/arch/microblaze/kernel/
Dmodule.c21 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.4.14/arch/openrisc/kernel/
Dmodule.c20 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.4.14/arch/cris/kernel/
Dmodule.c45 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.4.14/arch/nios2/kernel/
Dmodule.c44 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.4.14/arch/h8300/kernel/
Dmodule.c8 int apply_relocate_add(Elf32_Shdr *sechdrs, in apply_relocate_add() argument
15 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add()
18 sechdrs[relsec].sh_info); in apply_relocate_add()
19 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { in apply_relocate_add()
22 (uint32_t *)(sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
26 Elf32_Sym *sym = (Elf32_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
/linux-4.4.14/include/linux/
Dmoduleloader.h17 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,
Dkexec.h122 Elf_Shdr *sechdrs; member
328 Elf_Shdr *sechdrs, unsigned int relsec);
329 int __weak arch_kexec_apply_relocations(const Elf_Ehdr *ehdr, Elf_Shdr *sechdrs,
Dmodule.h785 const Elf_Shdr *sechdrs, in module_bug_finalize() argument
/linux-4.4.14/arch/alpha/kernel/
Dmodule.c76 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.4.14/arch/parisc/kernel/
Dmodule.c319 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.4.14/arch/mn10300/kernel/
Dmodule.c56 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.4.14/arch/c6x/kernel/
Dmodule.c45 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.4.14/arch/xtensa/kernel/
Dmodule.c49 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.4.14/arch/arm/kernel/
Dmodule.c55 apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, in apply_relocate() argument
58 Elf32_Shdr *symsec = sechdrs + symindex; in apply_relocate()
59 Elf32_Shdr *relsec = sechdrs + relindex; in apply_relocate()
60 Elf32_Shdr *dstsec = sechdrs + relsec->sh_info; in apply_relocate()
308 const Elf_Shdr *sechdrs, const char *name) in find_mod_section() argument
311 const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; in find_mod_section()
313 for (s = sechdrs, se = sechdrs + hdr->e_shnum; s < se; s++) in find_mod_section()
323 int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, in module_finalize() argument
328 const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; in module_finalize()
329 const Elf_Shdr *sechdrs_end = sechdrs + hdr->e_shnum; in module_finalize()
[all …]
Dvdso.c102 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()
Dmodule-plts.c132 int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, in module_frob_arch_sections() argument
136 Elf32_Shdr *s, *sechdrs_end = sechdrs + ehdr->e_shnum; in module_frob_arch_sections()
142 for (s = sechdrs; s < sechdrs_end; ++s) in module_frob_arch_sections()
153 for (s = sechdrs + 1; s < sechdrs_end; ++s) { in module_frob_arch_sections()
156 Elf32_Shdr *dstsec = sechdrs + s->sh_info; in module_frob_arch_sections()
/linux-4.4.14/arch/avr32/kernel/
Dmodule.c60 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.4.14/arch/s390/kernel/
Dmodule.c107 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.4.14/scripts/mod/
Dmodpost.c410 Elf_Shdr *sechdrs; in parse_elf() local
452 sechdrs = (void *)hdr + hdr->e_shoff; in parse_elf()
453 info->sechdrs = sechdrs; in parse_elf()
468 info->num_sections = TO_NATIVE(sechdrs[0].sh_size); in parse_elf()
474 info->secindex_strings = TO_NATIVE(sechdrs[0].sh_link); in parse_elf()
482 sechdrs[i].sh_name = TO_NATIVE(sechdrs[i].sh_name); in parse_elf()
483 sechdrs[i].sh_type = TO_NATIVE(sechdrs[i].sh_type); in parse_elf()
484 sechdrs[i].sh_flags = TO_NATIVE(sechdrs[i].sh_flags); in parse_elf()
485 sechdrs[i].sh_addr = TO_NATIVE(sechdrs[i].sh_addr); in parse_elf()
486 sechdrs[i].sh_offset = TO_NATIVE(sechdrs[i].sh_offset); in parse_elf()
[all …]
Dmodpost.h128 Elf_Shdr *sechdrs; member
Dfile2alias.c1340 if (info->sechdrs[get_secindex(info, sym)].sh_type & SHT_NOBITS) { in handle_moddevtable()
1345 + info->sechdrs[get_secindex(info, sym)].sh_offset in handle_moddevtable()
/linux-4.4.14/arch/tile/kernel/
Dmodule.c122 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.4.14/arch/m32r/kernel/
Dmodule.c71 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.4.14/arch/arm64/kernel/
Dmodule.c206 int apply_relocate_add(Elf64_Shdr *sechdrs, in apply_relocate_add() argument
218 Elf64_Rela *rel = (void *)sechdrs[relsec].sh_addr; in apply_relocate_add()
220 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add()
222 loc = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr in apply_relocate_add()
226 sym = (Elf64_Sym *)sechdrs[symindex].sh_addr in apply_relocate_add()
413 const Elf_Shdr *sechdrs, in module_finalize() argument
417 const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; in module_finalize()
419 for (s = sechdrs, se = sechdrs + hdr->e_shnum; s < se; s++) { in module_finalize()
/linux-4.4.14/lib/
Dbug.c85 void module_bug_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, in module_bug_finalize() argument
97 secstrings = (char *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; in module_bug_finalize()
99 if (strcmp(secstrings+sechdrs[i].sh_name, "__bug_table")) in module_bug_finalize()
101 mod->bug_table = (void *) sechdrs[i].sh_addr; in module_bug_finalize()
102 mod->num_bugs = sechdrs[i].sh_size / sizeof(struct bug_entry); in module_bug_finalize()
/linux-4.4.14/arch/unicore32/kernel/
Dmodule.c33 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.4.14/arch/score/kernel/
Dmodule.c30 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.4.14/arch/ia64/kernel/
Dmodule.c421 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()
449 for (s = sechdrs + 1; s < sechdrs_end; ++s) { in module_frob_arch_sections()
787 apply_relocate_add (Elf64_Shdr *sechdrs, const char *strtab, unsigned int symindex, in apply_relocate_add() argument
790 unsigned int i, n = sechdrs[relsec].sh_size / sizeof(Elf64_Rela); in apply_relocate_add()
791 Elf64_Rela *rela = (void *) sechdrs[relsec].sh_addr; in apply_relocate_add()
796 relsec, n, sechdrs[relsec].sh_info); in apply_relocate_add()
798 target_sec = sechdrs + sechdrs[relsec].sh_info; in apply_relocate_add()
828 ((Elf64_Sym *) sechdrs[symindex].sh_addr in apply_relocate_add()
[all …]
/linux-4.4.14/arch/sh/include/asm/
Ddwarf.h414 #define module_dwarf_finalize(hdr, sechdrs, me) (0) argument