Searched defs:sechdrs (Results 1 - 25 of 34) sorted by path

12

/arch/alpha/kernel/
H A Dmodule.c76 module_frob_arch_sections(Elf64_Ehdr *hdr, Elf64_Shdr *sechdrs, argument
84 esechdrs = sechdrs + hdr->e_shnum;
90 for (s = sechdrs; s < esechdrs; ++s)
95 me->arch.gotsecindex = s - sechdrs;
122 for (s = sechdrs; s < esechdrs; ++s)
145 apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab, argument
149 Elf64_Rela *rela = (void *)sechdrs[relsec].sh_addr;
150 unsigned long i, n = sechdrs[relsec].sh_size / sizeof(*rela);
156 sechdrs[relsec].sh_info);
158 base = (void *)sechdrs[sechdr
[all...]
/arch/arc/kernel/
H A Dmodule.c33 int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, argument
43 if (strcmp(secstr+sechdrs[i].sh_name, ".debug_frame") == 0) {
44 sechdrs[i].sh_flags |= SHF_ALLOC;
61 int apply_relocate_add(Elf32_Shdr *sechdrs, argument
68 Elf32_Rela *rel_entry = (void *)sechdrs[relsec].sh_addr;
75 sec_to_patch = sechdrs[sechdrs[relsec].sh_info].sh_addr;
76 sym_sec = (Elf32_Sym *) sechdrs[symindex].sh_addr;
77 n = sechdrs[relsec].sh_size / sizeof(*rel_entry);
131 int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, argument
[all...]
/arch/arm/kernel/
H A Dmodule.c50 apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, argument
53 Elf32_Shdr *symsec = sechdrs + symindex;
54 Elf32_Shdr *relsec = sechdrs + relindex;
55 Elf32_Shdr *dstsec = sechdrs + relsec->sh_info;
268 const Elf_Shdr *sechdrs, const char *name)
271 const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
273 for (s = sechdrs, se = sechdrs + hdr->e_shnum; s < se; s++)
283 int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, argument
288 const char *secstrs = (void *)hdr + sechdrs[hd
267 find_mod_section(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, const char *name) argument
[all...]
/arch/arm64/kernel/
H A Dmodule.c194 int apply_relocate_add(Elf64_Shdr *sechdrs, argument
206 Elf64_Rela *rel = (void *)sechdrs[relsec].sh_addr;
208 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
210 loc = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
214 sym = (Elf64_Sym *)sechdrs[symindex].sh_addr
/arch/avr32/kernel/
H A Dmodule.c62 int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, argument
75 switch (sechdrs[i].sh_type) {
77 symtab = &sechdrs[i];
93 strings = (void *)hdr + sechdrs[symtab->sh_link].sh_offset;
107 if (sechdrs[i].sh_type != SHT_RELA)
109 nrela = sechdrs[i].sh_size / sizeof(Elf32_Rela);
110 rela = (void *)hdr + sechdrs[i].sh_offset;
147 int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, argument
151 Elf32_Shdr *symsec = sechdrs + symindex;
152 Elf32_Shdr *relsec = sechdrs
295 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *module) argument
[all...]
/arch/blackfin/kernel/
H A Dmodule.c21 module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, argument
25 * XXX: sechdrs are vmalloced in kernel/module.c
31 Elf_Shdr *s, *sechdrs_end = sechdrs + hdr->e_shnum;
34 for (s = sechdrs; s < sechdrs_end; ++s) {
151 apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, argument
156 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr;
161 relsec, sechdrs[relsec].sh_info);
163 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
165 location = sechdrs[sechdrs[relse
234 module_finalize(const Elf_Ehdr * hdr, const Elf_Shdr * sechdrs, struct module *mod) argument
[all...]
/arch/c6x/kernel/
H A Dmodule.c45 int apply_relocate_add(Elf32_Shdr *sechdrs, argument
51 Elf32_Rela *rel = (void *) sechdrs[relsec].sh_addr;
59 relsec, sechdrs[relsec].sh_info, offset);
61 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
63 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
68 sym = (Elf_Sym *)sechdrs[symindex].sh_addr
/arch/cris/kernel/
H A Dmodule.c45 int apply_relocate_add(Elf32_Shdr *sechdrs, argument
52 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr;
55 sechdrs[relsec].sh_info);
57 for (i = 0; i < sechdrs[relsec].sh_size / sizeof (*rela); i++) {
60 = ((void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
65 = ((Elf32_Sym *)sechdrs[symindex].sh_addr
/arch/hexagon/kernel/
H A Dmodule.c36 * @sechdrs - pointer to elf load section headers
40 int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, argument
50 secstrings + sechdrs[i].sh_name);
51 if (strcmp(secstrings + sechdrs[i].sh_name, ".plt") == 0)
53 if (strcmp(secstrings + sechdrs[i].sh_name, ".got.plt") == 0)
55 if (strcmp(secstrings + sechdrs[i].sh_name, ".rela.plt") == 0)
72 * @sechdrs - pointer to section headers
80 int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, argument
88 unsigned int nrelocs = sechdrs[relsec].sh_size / sizeof(Elf32_Rela);
89 Elf32_Rela *rela = (void *)sechdrs[relse
[all...]
/arch/ia64/kernel/
H A Dmodule.c423 module_frob_arch_sections (Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, char *secstrings, argument
427 Elf64_Shdr *s, *sechdrs_end = sechdrs + ehdr->e_shnum;
433 for (s = sechdrs; s < sechdrs_end; ++s)
459 for (s = sechdrs + 1; s < sechdrs_end; ++s) {
797 apply_relocate_add (Elf64_Shdr *sechdrs, const char *strtab, unsigned int symindex, argument
800 unsigned int i, n = sechdrs[relsec].sh_size / sizeof(Elf64_Rela);
801 Elf64_Rela *rela = (void *) sechdrs[relsec].sh_addr;
806 relsec, n, sechdrs[relsec].sh_info);
808 target_sec = sechdrs + sechdrs[relse
914 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod) argument
[all...]
/arch/m32r/kernel/
H A Dmodule.c71 int apply_relocate_add(Elf32_Shdr *sechdrs, argument
78 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr;
89 sechdrs[relsec].sh_info);
90 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
92 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
96 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
/arch/m68k/kernel/
H A Dmodule.c22 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...]
/arch/metag/kernel/
H A Dmodule.c86 const Elf32_Shdr *sechdrs,
98 if ((strstr(secstrings + sechdrs[i].sh_name, ".init") != NULL)
103 if (strstr(secstrings + sechdrs[i].sh_name, ".debug") != NULL)
106 if (sechdrs[i].sh_type == SHT_RELA) {
109 (void *)hdr + sechdrs[i].sh_offset,
110 sechdrs[i].sh_size / sizeof(Elf32_Rela));
117 sort((void *)hdr + sechdrs[i].sh_offset,
118 sechdrs[i].sh_size / sizeof(Elf32_Rela),
122 + sechdrs[i].sh_offset,
123 sechdrs[
85 get_plt_size(const Elf32_Ehdr *hdr, const Elf32_Shdr *sechdrs, const char *secstrings, int is_init) argument
132 module_frob_arch_sections(Elf32_Ehdr *hdr, Elf32_Shdr *sechdrs, char *secstrings, struct module *me) argument
162 do_plt_call(void *location, Elf32_Addr val, Elf32_Shdr *sechdrs, struct module *mod) argument
198 apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, unsigned int relsec, struct module *me) argument
[all...]
/arch/microblaze/kernel/
H A Dmodule.c21 int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, argument
26 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr;
35 relsec, sechdrs[relsec].sh_info);
37 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) {
39 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr +
41 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr +
120 int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, argument
/arch/mips/kernel/
H A Dmodule-rela.c107 int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, argument
111 Elf_Mips_Rela *rel = (void *) sechdrs[relsec].sh_addr;
119 sechdrs[relsec].sh_info);
121 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
123 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
126 sym = (Elf_Sym *)sechdrs[symindex].sh_addr
H A Dmodule.c195 int apply_relocate(Elf_Shdr *sechdrs, const char *strtab, argument
199 Elf_Mips_Rel *rel = (void *) sechdrs[relsec].sh_addr;
207 sechdrs[relsec].sh_info);
210 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
212 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
215 sym = (Elf_Sym *)sechdrs[symindex].sh_addr
271 const Elf_Shdr *sechdrs,
275 char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
281 for (s = sechdrs;
270 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) argument
[all...]
H A Dvpe.c183 Elf_Shdr *sechdrs, const char *secstrings)
197 sechdrs[i].sh_entsize = ~0UL;
201 Elf_Shdr *s = &sechdrs[i];
425 static int apply_relocations(Elf32_Shdr *sechdrs, argument
431 Elf32_Rel *rel = (void *) sechdrs[relsec].sh_addr;
438 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
442 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
445 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
477 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
536 dump_elfsymbols(Elf_Shdr *sechdrs, unsigned int symindex, const char *strtab, struct module *mod) argument
550 find_vpe_symbols(struct vpe *v, Elf_Shdr *sechdrs, unsigned int symindex, const char *strtab, struct module *mod) argument
579 Elf_Shdr *sechdrs; local
[all...]
/arch/mn10300/kernel/
H A Dmodule.c56 int apply_relocate_add(Elf32_Shdr *sechdrs, argument
63 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr;
70 relsec, sechdrs[relsec].sh_info);
72 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
74 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
79 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
/arch/openrisc/kernel/
H A Dmodule.c20 int apply_relocate_add(Elf32_Shdr *sechdrs, argument
27 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr;
33 sechdrs[relsec].sh_info);
34 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
36 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
41 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
/arch/parisc/kernel/
H A Dmodule.c323 CONST Elf_Shdr *sechdrs,
336 const Elf_Rela *rels = (void *)sechdrs[i].sh_addr;
337 unsigned long nrels = sechdrs[i].sh_size / sizeof(*rels);
340 if (strncmp(secstrings + sechdrs[i].sh_name,
344 if (sechdrs[i].sh_type != SHT_RELA)
364 s = sechdrs[i].sh_info;
542 int apply_relocate_add(Elf_Shdr *sechdrs, argument
549 Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr;
556 unsigned int targetsec = sechdrs[relsec].sh_info;
562 for (i = 0; i < sechdrs[relse
322 module_frob_arch_sections(CONST Elf_Ehdr *hdr, CONST Elf_Shdr *sechdrs, CONST char *secstrings, struct module *me) argument
679 apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, unsigned int symindex, unsigned int relsec, struct module *me) argument
835 register_unwind_table(struct module *me, const Elf_Shdr *sechdrs) argument
860 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) argument
[all...]
/arch/powerpc/kernel/
H A Dmodule.c33 const Elf_Shdr *sechdrs,
39 secstrings = (char *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
41 if (strcmp(secstrings+sechdrs[i].sh_name, name) == 0)
42 return &sechdrs[i];
47 const Elf_Shdr *sechdrs, struct module *me)
52 sect = find_section(hdr, sechdrs, "__ftr_fixup");
58 sect = find_section(hdr, sechdrs, "__mmu_ftr_fixup");
65 sect = find_section(hdr, sechdrs, "__fw_ftr_fixup");
72 sect = find_section(hdr, sechdrs, "__lwsync_fixup");
32 find_section(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, const char *name) argument
46 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) argument
H A Dmodule_32.c100 const Elf32_Shdr *sechdrs,
112 if ((strstr(secstrings + sechdrs[i].sh_name, ".init") != 0)
117 if (strstr(secstrings + sechdrs[i].sh_name, ".debug") != 0)
120 if (sechdrs[i].sh_type == SHT_RELA) {
123 (void *)hdr + sechdrs[i].sh_offset,
124 sechdrs[i].sh_size / sizeof(Elf32_Rela));
131 sort((void *)hdr + sechdrs[i].sh_offset,
132 sechdrs[i].sh_size / sizeof(Elf32_Rela),
136 + sechdrs[i].sh_offset,
137 sechdrs[
99 get_plt_size(const Elf32_Ehdr *hdr, const Elf32_Shdr *sechdrs, const char *secstrings, int is_init) argument
146 module_frob_arch_sections(Elf32_Ehdr *hdr, Elf32_Shdr *sechdrs, char *secstrings, struct module *me) argument
182 do_plt_call(void *location, Elf32_Addr val, Elf32_Shdr *sechdrs, struct module *mod) argument
212 apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, unsigned int relsec, struct module *module) argument
[all...]
H A Dmodule_64.c271 const Elf64_Shdr *sechdrs)
279 if (sechdrs[i].sh_type == SHT_RELA) {
282 (void *)sechdrs[i].sh_addr,
283 sechdrs[i].sh_size / sizeof(Elf64_Rela));
290 sort((void *)sechdrs[i].sh_addr,
291 sechdrs[i].sh_size / sizeof(Elf64_Rela),
294 relocs += count_relocs((void *)sechdrs[i].sh_addr,
295 sechdrs[i].sh_size
343 static Elf64_Sym *find_dot_toc(Elf64_Shdr *sechdrs, argument
350 syms = (Elf64_Sym *)sechdrs[syminde
270 get_stubs_size(const Elf64_Ehdr *hdr, const Elf64_Shdr *sechdrs) argument
361 module_frob_arch_sections(Elf64_Ehdr *hdr, Elf64_Shdr *sechdrs, char *secstrings, struct module *me) argument
410 my_r2(Elf64_Shdr *sechdrs, struct module *me) argument
423 create_stub(Elf64_Shdr *sechdrs, struct ppc64_stub_entry *entry, unsigned long addr, struct module *me) argument
449 stub_for_addr(Elf64_Shdr *sechdrs, unsigned long addr, struct module *me) argument
487 apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab, unsigned int symindex, unsigned int relsec, struct module *me) argument
[all...]
H A Dvdso.c299 Elf32_Shdr *sechdrs; local
304 sechdrs = (void *)ehdr + ehdr->e_shoff;
305 secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset;
309 if (strcmp(secnames+sechdrs[i].sh_name, secname) == 0) {
311 *size = sechdrs[i].sh_size;
312 return (void *)ehdr + sechdrs[i].sh_offset;
390 Elf64_Shdr *sechdrs; local
395 sechdrs = (void *)ehdr + ehdr->e_shoff;
396 secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset;
400 if (strcmp(secnames+sechdrs[
[all...]
/arch/s390/kernel/
H A Dmodule.c117 int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, argument
129 switch (sechdrs[i].sh_type) {
131 symtab = sechdrs + i;
146 strings = (void *) hdr + sechdrs[symtab->sh_link].sh_offset;
162 if (sechdrs[i].sh_type != SHT_RELA)
164 nrela = sechdrs[i].sh_size / sizeof(Elf_Rela);
165 rela = (void *) hdr + sechdrs[i].sh_offset;
414 int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, argument
425 relsec, sechdrs[relsec].sh_info);
426 base = sechdrs[sechdr
439 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) argument
[all...]

Completed in 554 milliseconds

12