/kernel/linux/linux-5.10/arch/loongarch/boot/tools/ |
H A D | relocs.c | 213 sec->strtab = malloc(sec->shdr.sh_size); in read_strtabs() 216 sec->shdr.sh_size); in read_strtabs() 222 if (fread(sec->strtab, 1, sec->shdr.sh_size, fp) != in read_strtabs() 223 sec->shdr.sh_size) in read_strtabs() 237 sec->symtab = malloc(sec->shdr.sh_size); in read_symtabs() 240 sec->shdr.sh_size); in read_symtabs() 246 if (fread(sec->symtab, 1, sec->shdr.sh_size, fp) != in read_symtabs() 247 sec->shdr.sh_size) in read_symtabs() 272 sec->reltab = malloc(sec->shdr.sh_size); in read_relocs() 275 sec->shdr.sh_size); in read_relocs() [all...] |
/kernel/linux/linux-6.6/arch/x86/tools/ |
H A D | relocs.c | 297 nsyms = sec->shdr.sh_size/sizeof(Elf_Sym); in sym_lookup() 426 shnum = elf_xword_to_cpu(shdr.sh_size); in read_ehdr() 460 sec->shdr.sh_size = elf_xword_to_cpu(shdr.sh_size); in read_shdrs() 479 sec->strtab = malloc(sec->shdr.sh_size); in read_strtabs() 482 sec->shdr.sh_size); in read_strtabs() 488 if (fread(sec->strtab, 1, sec->shdr.sh_size, fp) in read_strtabs() 489 != sec->shdr.sh_size) { in read_strtabs() 506 sec->xsymtab = malloc(sec->shdr.sh_size); in read_symtabs() 509 sec->shdr.sh_size); in read_symtabs() [all...] |
/kernel/linux/linux-5.10/arch/mips/boot/tools/ |
H A D | relocs.c | 284 sec->shdr.sh_size = elf_xword_to_cpu(shdr.sh_size); in read_shdrs() 304 sec->strtab = malloc(sec->shdr.sh_size); in read_strtabs() 307 sec->shdr.sh_size); in read_strtabs() 313 if (fread(sec->strtab, 1, sec->shdr.sh_size, fp) != in read_strtabs() 314 sec->shdr.sh_size) in read_strtabs() 328 sec->symtab = malloc(sec->shdr.sh_size); in read_symtabs() 331 sec->shdr.sh_size); in read_symtabs() 337 if (fread(sec->symtab, 1, sec->shdr.sh_size, fp) != in read_symtabs() 338 sec->shdr.sh_size) in read_symtabs() [all...] |
/kernel/linux/linux-6.6/arch/mips/boot/tools/ |
H A D | relocs.c | 284 sec->shdr.sh_size = elf_xword_to_cpu(shdr.sh_size); in read_shdrs() 304 sec->strtab = malloc(sec->shdr.sh_size); in read_strtabs() 307 sec->shdr.sh_size); in read_strtabs() 313 if (fread(sec->strtab, 1, sec->shdr.sh_size, fp) != in read_strtabs() 314 sec->shdr.sh_size) in read_strtabs() 328 sec->symtab = malloc(sec->shdr.sh_size); in read_symtabs() 331 sec->shdr.sh_size); in read_symtabs() 337 if (fread(sec->symtab, 1, sec->shdr.sh_size, fp) != in read_symtabs() 338 sec->shdr.sh_size) in read_symtabs() [all...] |
/kernel/linux/linux-5.10/arch/powerpc/kernel/ |
H A D | module.c | 49 (void *)sect->sh_addr + sect->sh_size); in module_finalize() 55 (void *)sect->sh_addr + sect->sh_size); in module_finalize() 62 (void *)sect->sh_addr + sect->sh_size); in module_finalize() 69 me->arch.end_opd = sect->sh_addr + sect->sh_size; in module_finalize() 78 (void *)sect->sh_addr + sect->sh_size); in module_finalize() 85 (void *)sect->sh_addr + sect->sh_size); in module_finalize()
|
H A D | module_32.c | 97 sechdrs[i].sh_size / sizeof(Elf32_Rela)); in get_plt_size() 105 sechdrs[i].sh_size / sizeof(Elf32_Rela), in get_plt_size() 110 sechdrs[i].sh_size in get_plt_size() 139 sechdrs[me->arch.core_plt_section].sh_size in module_frob_arch_sections() 141 sechdrs[me->arch.init_plt_section].sh_size in module_frob_arch_sections() 207 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { in apply_relocate_add()
|
H A D | module_64.c | 208 sechdrs[i].sh_size / sizeof(Elf64_Rela)); in get_stubs_size() 216 sechdrs[i].sh_size / sizeof(Elf64_Rela), in get_stubs_size() 220 sechdrs[i].sh_size in get_stubs_size() 278 numsyms = sechdrs[symindex].sh_size / sizeof(Elf64_Sym); in find_dot_toc() 307 sechdrs[i].sh_size); in module_frob_arch_sections() 315 sechdrs[i].sh_size / sizeof(Elf64_Sym), in module_frob_arch_sections() 333 sechdrs[me->arch.stubs_section].sh_size = get_stubs_size(hdr, sechdrs); in module_frob_arch_sections() 475 num_stubs = sechdrs[me->arch.stubs_section].sh_size / sizeof(*stubs); in stub_for_addr() 545 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { in apply_relocate_add()
|
/kernel/linux/linux-6.6/arch/powerpc/kernel/ |
H A D | module.c | 51 (void *)sect->sh_addr + sect->sh_size); in module_finalize() 57 (void *)sect->sh_addr + sect->sh_size); in module_finalize() 64 (void *)sect->sh_addr + sect->sh_size); in module_finalize() 71 me->arch.end_opd = sect->sh_addr + sect->sh_size; in module_finalize() 80 (void *)sect->sh_addr + sect->sh_size); in module_finalize() 87 (void *)sect->sh_addr + sect->sh_size); in module_finalize()
|
H A D | module_64.c | 220 sechdrs[i].sh_size / sizeof(Elf64_Rela)); in get_stubs_size() 228 sechdrs[i].sh_size / sizeof(Elf64_Rela), in get_stubs_size() 232 sechdrs[i].sh_size in get_stubs_size() 237 sechdrs[i].sh_size in get_stubs_size() 309 sechdrs[i].sh_size / sizeof(Elf64_Rela)); in get_got_size() 318 sechdrs[i].sh_size / sizeof(Elf64_Rela), in get_got_size() 322 sechdrs[i].sh_size in get_got_size() 335 sechdrs[i].sh_size in get_got_size() 386 numsyms = sechdrs[symindex].sh_size / sizeof(Elf64_Sym); in find_dot_toc() 430 sechdrs[i].sh_size); in module_frob_arch_sections() [all...] |
H A D | module_32.c | 98 sechdrs[i].sh_size / sizeof(Elf32_Rela)); in get_plt_size() 106 sechdrs[i].sh_size / sizeof(Elf32_Rela), in get_plt_size() 111 sechdrs[i].sh_size in get_plt_size() 140 sechdrs[me->arch.core_plt_section].sh_size in module_frob_arch_sections() 142 sechdrs[me->arch.init_plt_section].sh_size in module_frob_arch_sections() 210 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) { in apply_relocate_add()
|
/kernel/linux/linux-5.10/arch/x86/kernel/ |
H A D | module.c | 102 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate() 145 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in __apply_relocate_add() 279 apply_retpolines(rseg, rseg + retpolines->sh_size); in module_finalize() 283 apply_returns(rseg, rseg + returns->sh_size); in module_finalize() 288 apply_alternatives(aseg, aseg + alt->sh_size); in module_finalize() 294 lseg, lseg + locks->sh_size, in module_finalize() 295 tseg, tseg + text->sh_size); in module_finalize() 300 apply_paravirt(pseg, pseg + para->sh_size); in module_finalize() 307 unwind_module_init(me, (void *)orc_ip->sh_addr, orc_ip->sh_size, in module_finalize() 308 (void *)orc->sh_addr, orc->sh_size); in module_finalize() [all...] |
/kernel/linux/linux-6.6/arch/x86/kernel/ |
H A D | module.c | 104 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate() 150 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in __write_relocate_add() 313 apply_paravirt(pseg, pseg + para->sh_size); in module_finalize() 321 rsize = retpolines->sh_size; in module_finalize() 326 csize = cfi->sh_size; in module_finalize() 333 apply_retpolines(rseg, rseg + retpolines->sh_size); in module_finalize() 337 apply_returns(rseg, rseg + returns->sh_size); in module_finalize() 342 apply_alternatives(aseg, aseg + alt->sh_size); in module_finalize() 349 cs.call_end = (void *)calls->sh_addr + calls->sh_size; in module_finalize() 354 cs.pv_end = (void *)para->sh_addr + para->sh_size; in module_finalize() [all...] |
/kernel/linux/linux-5.10/arch/x86/tools/ |
H A D | relocs.c | 286 nsyms = sec->shdr.sh_size/sizeof(Elf_Sym); in sym_lookup() 398 shnum = elf_xword_to_cpu(shdr.sh_size); in read_ehdr() 432 sec->shdr.sh_size = elf_xword_to_cpu(shdr.sh_size); in read_shdrs() 451 sec->strtab = malloc(sec->shdr.sh_size); in read_strtabs() 454 sec->shdr.sh_size); in read_strtabs() 460 if (fread(sec->strtab, 1, sec->shdr.sh_size, fp) in read_strtabs() 461 != sec->shdr.sh_size) { in read_strtabs() 476 sec->symtab = malloc(sec->shdr.sh_size); in read_symtabs() 479 sec->shdr.sh_size); in read_symtabs() [all...] |
/kernel/linux/linux-5.10/arch/nds32/kernel/ |
H A D | module.c | 123 for (i = 0; i < relsec->sh_size / sizeof(Elf32_Rela); i++, rel++) { in apply_relocate_add() 131 || offset > (symsec->sh_size / sizeof(Elf32_Sym))) { in apply_relocate_add() 140 || rel->r_offset > dstsec->sh_size - sizeof(u16)) { in apply_relocate_add() 143 relindex, i, rel->r_offset, dstsec->sh_size); in apply_relocate_add() 256 relindex, i, rel->r_offset, dstsec->sh_size); in apply_relocate_add() 263 relindex, i, rel->r_offset, dstsec->sh_size); in apply_relocate_add()
|
/kernel/linux/linux-5.10/arch/ia64/kernel/ |
H A D | module.c | 453 unsigned long numrels = s->sh_size/sizeof(Elf64_Rela); in module_frob_arch_sections() 469 mod->arch.core_plt->sh_size = core_plts * sizeof(struct plt_entry); in module_frob_arch_sections() 473 mod->arch.init_plt->sh_size = init_plts * sizeof(struct plt_entry); in module_frob_arch_sections() 477 mod->arch.got->sh_size = gots * sizeof(struct got_entry); in module_frob_arch_sections() 481 mod->arch.opd->sh_size = fdescs * sizeof(struct fdesc); in module_frob_arch_sections() 483 __func__, mod->arch.core_plt->sh_size, mod->arch.init_plt->sh_size, in module_frob_arch_sections() 484 mod->arch.got->sh_size, mod->arch.opd->sh_size); in module_frob_arch_sections() 523 BUG_ON(e >= (struct got_entry *) (mod->arch.got->sh_addr + mod->arch.got->sh_size)); in get_ltoff() [all...] |
/kernel/linux/linux-6.6/arch/ia64/kernel/ |
H A D | module.c | 453 unsigned long numrels = s->sh_size/sizeof(Elf64_Rela); in module_frob_arch_sections() 469 mod->arch.core_plt->sh_size = core_plts * sizeof(struct plt_entry); in module_frob_arch_sections() 473 mod->arch.init_plt->sh_size = init_plts * sizeof(struct plt_entry); in module_frob_arch_sections() 477 mod->arch.got->sh_size = gots * sizeof(struct got_entry); in module_frob_arch_sections() 481 mod->arch.opd->sh_size = fdescs * sizeof(struct fdesc); in module_frob_arch_sections() 483 __func__, mod->arch.core_plt->sh_size, mod->arch.init_plt->sh_size, in module_frob_arch_sections() 484 mod->arch.got->sh_size, mod->arch.opd->sh_size); in module_frob_arch_sections() 523 BUG_ON(e >= (struct got_entry *) (mod->arch.got->sh_addr + mod->arch.got->sh_size)); in get_ltoff() [all...] |
/kernel/linux/linux-5.10/scripts/ |
H A D | sorttable.h | 233 shnum = _r(&shdr[0].sh_size); in do_sort() 250 relocs_size = _r(&s->sh_size); in do_sort() 259 orc_ip_size = s->sh_size; in do_sort() 264 orc_size = s->sh_size; in do_sort() 318 custom_sort(extab_image, _r(&extab_sec->sh_size)); in do_sort() 320 int num_entries = _r(&extab_sec->sh_size) / extable_ent_size; in do_sort() 331 sym < sym + _r(&symtab_sec->sh_size) / sizeof(Elf_Sym); in do_sort()
|
H A D | recordmcount.h | 214 return w(shdr0->sh_size); in get_shnum() 223 shdr0->sh_size = w(new_shnum); in set_shnum() 273 uint_t const old_shstr_sh_size = _w(shstr->sh_size); in append_func() 278 uint_t t = 1 + strlen(mc_name) + _w(shstr->sh_size); in append_func() 281 shstr->sh_size = _w(t); in append_func() 313 mcsec.sh_size = _w((void *)mlocp - (void *)mloc0); in append_func() 328 mcsec.sh_size = _w((void *)mrelp - (void *)mrel0); in append_func() 415 unsigned const nrel = _w(relhdr->sh_size) / rel_entsize; in sift_rel_mcount() 462 unsigned const nrel = _w(relhdr->sh_size) / rel_entsize; in nop_mcount() 527 unsigned const nsym = _w(symhdr->sh_size) / _ in find_secsym_ndx() [all...] |
/kernel/linux/linux-5.10/arch/loongarch/kernel/ |
H A D | module-sections.c | 139 int num_rela = sechdrs[i].sh_size / sizeof(Elf_Rela); in module_frob_arch_sections() 157 got_sec->sh_size = (num_gots + 1) * sizeof(struct got_entry); in module_frob_arch_sections() 165 plt_sec->sh_size = (num_plts + 1) * sizeof(struct plt_entry); in module_frob_arch_sections() 173 plt_idx_sec->sh_size = (num_plts + 1) * sizeof(struct plt_idx_entry); in module_frob_arch_sections() 181 tramp->sh_size = NR_FTRACE_PLTS * sizeof(struct plt_entry); in module_frob_arch_sections()
|
/kernel/linux/linux-6.6/arch/loongarch/kernel/ |
H A D | module-sections.c | 139 int num_rela = sechdrs[i].sh_size / sizeof(Elf_Rela); in module_frob_arch_sections() 157 got_sec->sh_size = (num_gots + 1) * sizeof(struct got_entry); in module_frob_arch_sections() 165 plt_sec->sh_size = (num_plts + 1) * sizeof(struct plt_entry); in module_frob_arch_sections() 173 plt_idx_sec->sh_size = (num_plts + 1) * sizeof(struct plt_idx_entry); in module_frob_arch_sections() 181 tramp->sh_size = NR_FTRACE_PLTS * sizeof(struct plt_entry); in module_frob_arch_sections()
|
/kernel/linux/linux-6.6/scripts/ |
H A D | recordmcount.h | 214 return w(shdr0->sh_size); in get_shnum() 223 shdr0->sh_size = w(new_shnum); in set_shnum() 273 uint_t const old_shstr_sh_size = _w(shstr->sh_size); in append_func() 278 uint_t t = 1 + strlen(mc_name) + _w(shstr->sh_size); in append_func() 281 shstr->sh_size = _w(t); in append_func() 313 mcsec.sh_size = _w((void *)mlocp - (void *)mloc0); in append_func() 328 mcsec.sh_size = _w((void *)mrelp - (void *)mrel0); in append_func() 415 unsigned const nrel = _w(relhdr->sh_size) / rel_entsize; in sift_rel_mcount() 462 unsigned const nrel = _w(relhdr->sh_size) / rel_entsize; in nop_mcount() 527 unsigned const nsym = _w(symhdr->sh_size) / _ in find_secsym_ndx() [all...] |
/kernel/linux/linux-5.10/arch/arm/kernel/ |
H A D | module-plts.c | 88 BUG_ON(pltsec->plt_count * PLT_ENT_SIZE > pltsec->plt->sh_size); in get_module_plt() 246 int numrels = s->sh_size / sizeof(Elf32_Rel); in module_frob_arch_sections() 270 mod->arch.core.plt->sh_size = round_up(core_plts * PLT_ENT_SIZE, in module_frob_arch_sections() 278 mod->arch.init.plt->sh_size = round_up(init_plts * PLT_ENT_SIZE, in module_frob_arch_sections() 284 mod->arch.core.plt->sh_size, mod->arch.init.plt->sh_size); in module_frob_arch_sections()
|
H A D | module.c | 81 for (i = 0; i < relsec->sh_size / sizeof(Elf32_Rel); i++, rel++) { in apply_relocate() 92 if (offset < 0 || offset > (symsec->sh_size / sizeof(Elf32_Sym))) { in apply_relocate() 101 if (rel->r_offset < 0 || rel->r_offset > dstsec->sh_size - sizeof(u32)) { in apply_relocate() 104 rel->r_offset, dstsec->sh_size); in apply_relocate() 409 maps[i].unw_sec->sh_size, in module_finalize() 411 maps[i].txt_sec->sh_size); in module_finalize() 416 fixup_pv_table((void *)s->sh_addr, s->sh_size); in module_finalize() 421 fixup_smp((void *)s->sh_addr, s->sh_size); in module_finalize()
|
/kernel/linux/linux-6.6/arch/arm/kernel/ |
H A D | module-plts.c | 83 BUG_ON(pltsec->plt_count * PLT_ENT_SIZE > pltsec->plt->sh_size); in get_module_plt() 241 int numrels = s->sh_size / sizeof(Elf32_Rel); in module_frob_arch_sections() 265 mod->arch.core.plt->sh_size = round_up(core_plts * PLT_ENT_SIZE, in module_frob_arch_sections() 273 mod->arch.init.plt->sh_size = round_up(init_plts * PLT_ENT_SIZE, in module_frob_arch_sections() 279 mod->arch.core.plt->sh_size, mod->arch.init.plt->sh_size); in module_frob_arch_sections()
|
H A D | module.c | 119 for (i = 0; i < relsec->sh_size / sizeof(Elf32_Rel); i++, rel++) { in apply_relocate() 133 if (offset < 0 || offset > (symsec->sh_size / sizeof(Elf32_Sym))) { in apply_relocate() 142 if (rel->r_offset < 0 || rel->r_offset > dstsec->sh_size - sizeof(u32)) { in apply_relocate() 145 rel->r_offset, dstsec->sh_size); in apply_relocate() 483 s->sh_size, in module_finalize() 485 txt_sec->sh_size); in module_finalize() 498 fixup_pv_table((void *)s->sh_addr, s->sh_size); in module_finalize() 503 fixup_smp((void *)s->sh_addr, s->sh_size); in module_finalize()
|