Searched refs:sechdrs (Results 1 - 25 of 57) sorted by last modified time

123

/linux-master/scripts/mod/
H A Dmodpost.c329 Elf_Shdr *sechdr = &info->sechdrs[secindex];
351 * Return "" if the index is out of range of info->sechdrs[] array.
356 return sech_name(info, &info->sechdrs[secindex]);
419 Elf_Shdr *sechdrs; local
461 sechdrs = (void *)hdr + hdr->e_shoff;
462 info->sechdrs = sechdrs;
478 info->num_sections = TO_NATIVE(sechdrs[0].sh_size);
484 info->secindex_strings = TO_NATIVE(sechdrs[0].sh_link);
492 sechdrs[
[all...]
H A Dfile2alias.c1624 if (info->sechdrs[get_secindex(info, sym)].sh_type & SHT_NOBITS) {
H A Dmodpost.h115 Elf_Shdr *sechdrs; member in struct:elf_info
/linux-master/arch/loongarch/kernel/
H A Dmodule.c106 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/loongarch/include/asm/
H A Dmodule.h50 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/module/
H A Dmain.c187 Elf_Shdr *shdr = &info->sechdrs[i];
200 return (void *)info->sechdrs[find_sec(info, name)].sh_addr;
212 *num = info->sechdrs[sec].sh_size / object_size;
213 return (void *)info->sechdrs[sec].sh_addr;
222 Elf_Shdr *shdr = &info->sechdrs[i];
241 *num = info->sechdrs[sec].sh_size / object_size;
242 return (void *)info->sechdrs[sec].sh_addr;
377 Elf_Shdr *pcpusec = &info->sechdrs[info->index.pcpu];
473 if (info->sechdrs[info->index.pcpu].sh_size != 0)
1036 Elf_Shdr *infosec = &info->sechdrs[inf
2337 module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, char *secstrings, struct module *mod) argument
2432 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) argument
[all...]
H A Dstrict_rwx.c81 int module_enforce_rwx_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, argument
91 if ((sechdrs[i].sh_flags & shf_wx) == shf_wx) {
93 mod->name, secstrings + sechdrs[i].sh_name, i);
H A Dinternal.h67 Elf_Shdr *sechdrs; member in struct:load_info
328 int module_enforce_rwx_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
H A Dsysfs.c81 if (!sect_empty(&info->sechdrs[i]))
98 Elf_Shdr *sec = &info->sechdrs[i];
185 if (!sect_empty(&info->sechdrs[i]) &&
186 info->sechdrs[i].sh_type == SHT_NOTE)
200 if (sect_empty(&info->sechdrs[i]))
202 if (info->sechdrs[i].sh_type == SHT_NOTE) {
206 nattr->size = info->sechdrs[i].sh_size;
207 nattr->private = (void *)info->sechdrs[i].sh_addr;
/linux-master/kernel/
H A Dkexec_file.c108 vfree(pi->sechdrs);
109 pi->sechdrs = NULL;
832 const Elf_Shdr *sechdrs; local
838 sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff;
843 if (!(sechdrs[i].sh_flags & SHF_ALLOC))
846 align = sechdrs[i].sh_addralign;
847 if (sechdrs[i].sh_type != SHT_NOBITS) {
851 kbuf->bufsz += sechdrs[i].sh_size;
856 bss_sz += sechdrs[i].sh_size;
881 * kexec_purgatory_setup_sechdrs - prepares the pi->sechdrs buffe
896 Elf_Shdr *sechdrs; local
966 const Elf_Shdr *sechdrs; local
1075 const Elf_Shdr *sechdrs; local
[all...]
/linux-master/include/linux/
H A Dmoduleloader.h21 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 Dkexec.h115 * Temporary, modifiable buffer for sechdrs used for relocation.
118 Elf_Shdr *sechdrs; member in struct:purgatory_info
H A Dmodule.h390 * @sechdrs: Section header table
396 Elf_Shdr *sechdrs; member in struct:klp_modinfo
881 const Elf_Shdr *sechdrs,
880 module_bug_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod) argument
H A Dcfi.h40 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/x86/kernel/
H A Dmachine_kexec_64.c394 const Elf_Shdr *sechdrs; local
397 sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff;
398 strtab = (char *)pi->ehdr + sechdrs[symtabsec->sh_link].sh_offset;
399 shstrtab = (char *)pi->ehdr + sechdrs[pi->ehdr->e_shstrndx].sh_offset;
437 name = shstrtab + sechdrs[sym->st_shndx].sh_name;
460 sec_base = pi->sechdrs[sym->st_shndx].sh_addr;
H A Dmodule.c91 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/s390/kernel/
H A Dmachine_kexec_file.c315 const Elf_Shdr *sechdrs; local
321 sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff;
322 strtab = (char *)pi->ehdr + sechdrs[symtab->sh_link].sh_offset;
323 shstrtab = (char *)pi->ehdr + sechdrs[pi->ehdr->e_shstrndx].sh_offset;
339 name = shstrtab + sechdrs[sym->st_shndx].sh_name;
364 val += pi->sechdrs[sym->st_shndx].sh_addr;
/linux-master/arch/riscv/kernel/
H A Delf_kexec.c377 const Elf_Shdr *sechdrs; local
382 sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff;
383 strtab = (char *)pi->ehdr + sechdrs[symtab->sh_link].sh_offset;
384 shstrtab = (char *)pi->ehdr + sechdrs[pi->ehdr->e_shstrndx].sh_offset;
401 name = shstrtab + sechdrs[sym->st_shndx].sh_name;
414 sec_base = pi->sechdrs[sym->st_shndx].sh_addr;
H A Dmodule.c777 int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, argument
781 Elf_Rela *rel = (void *) sechdrs[relsec].sh_addr;
789 unsigned int num_relocations = sechdrs[relsec].sh_size / sizeof(*rel);
803 sechdrs[relsec].sh_info);
807 location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
810 sym = (Elf_Sym *)sechdrs[symindex].sh_addr
842 sechdrs[sechdrs[relsec].sh_info].sh_addr
852 (Elf_Sym *)sechdrs[syminde
919 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) argument
[all...]
/linux-master/arch/arm64/kernel/
H A Dmodule.c317 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...]
H A Dmodule-plts.c69 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/arm/kernel/
H A Dvdso.c103 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/mips/kernel/
H A Dvpe.c183 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...]
H A Dmodule.c313 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...]
/linux-master/kernel/livepatch/
H A Dcore.c192 static int klp_resolve_symbols(Elf_Shdr *sechdrs, const char *strtab, argument
220 sym = (Elf_Sym *)sechdrs[symndx].sh_addr + ELF_R_SYM(relas[i].r_info);
263 void __weak clear_relocate_add(Elf_Shdr *sechdrs, argument
294 static int klp_write_section_relocs(struct module *pmod, Elf_Shdr *sechdrs, argument
301 Elf_Shdr *sec = sechdrs + secndx;
320 ret = klp_resolve_symbols(sechdrs, strtab, symndx,
325 return apply_relocate_add(sechdrs, strtab, symndx, secndx, pmod);
328 clear_relocate_add(sechdrs, strtab, symndx, secndx, pmod);
332 int klp_apply_section_relocs(struct module *pmod, Elf_Shdr *sechdrs, argument
337 return klp_write_section_relocs(pmod, sechdrs, shstrta
[all...]

Completed in 243 milliseconds

123