| /linux/arch/powerpc/kernel/ |
| H A D | module.c | 48 (void *)sect->sh_addr + sect->sh_size); in module_finalize() 54 (void *)sect->sh_addr + sect->sh_size); in module_finalize() 61 (void *)sect->sh_addr + sect->sh_size); in module_finalize() 68 me->arch.end_opd = sect->sh_addr + sect->sh_size; in module_finalize() 77 (void *)sect->sh_addr + sect->sh_size); in module_finalize() 84 (void *)sect->sh_addr + sect->sh_size); in module_finalize()
|
| H A D | module_64.c | 221 sechdrs[i].sh_size / sizeof(Elf64_Rela)); in get_stubs_size() 229 sechdrs[i].sh_size / sizeof(Elf64_Rela), in get_stubs_size() 233 sechdrs[i].sh_size in get_stubs_size() 238 sechdrs[i].sh_size in get_stubs_size() 252 me->arch.ool_stub_count = sechdrs[i].sh_size / sizeof(unsigned long); in get_stubs_size() 318 sechdrs[i].sh_size / sizeof(Elf64_Rela)); in get_got_size() 327 sechdrs[i].sh_size / sizeof(Elf64_Rela), in get_got_size() 331 sechdrs[i].sh_size in get_got_size() 344 sechdrs[i].sh_size in get_got_size() 413 numsyms = sechdrs[symindex].sh_size / sizeof(Elf64_Sym); in find_dot_toc() [all …]
|
| /linux/arch/mips/boot/tools/ |
| H A D | relocs.c | 285 sec->shdr.sh_size = elf_xword_to_cpu(shdr.sh_size); in read_shdrs() 305 sec->strtab = malloc(sec->shdr.sh_size); in read_strtabs() 308 sec->shdr.sh_size); in read_strtabs() 314 if (fread(sec->strtab, 1, sec->shdr.sh_size, fp) != in read_strtabs() 315 sec->shdr.sh_size) in read_strtabs() 329 sec->symtab = malloc(sec->shdr.sh_size); in read_symtabs() 332 sec->shdr.sh_size); in read_symtabs() 338 if (fread(sec->symtab, 1, sec->shdr.sh_size, fp) != in read_symtabs() 339 sec->shdr.sh_size) in read_symtabs() 342 for (j = 0; j < sec->shdr.sh_size/sizeof(Elf_Sym); j++) { in read_symtabs() [all …]
|
| /linux/arch/x86/tools/ |
| H A D | relocs.c | 401 shnum = elf_xword_to_cpu(shdr.sh_size); in read_ehdr() 434 sec->shdr.sh_size = elf_xword_to_cpu(shdr.sh_size); in read_shdrs() 455 sec->strtab = malloc(sec->shdr.sh_size); in read_strtabs() 457 die("malloc of %" FMT " bytes for strtab failed\n", sec->shdr.sh_size); in read_strtabs() 462 if (fread(sec->strtab, 1, sec->shdr.sh_size, fp) != sec->shdr.sh_size) in read_strtabs() 477 sec->xsymtab = malloc(sec->shdr.sh_size); in read_symtabs() 479 die("malloc of %" FMT " bytes for xsymtab failed\n", sec->shdr.sh_size); in read_symtabs() 484 if (fread(sec->xsymtab, 1, sec->shdr.sh_size, fp) != sec->shdr.sh_size) in read_symtabs() 491 num_syms = sec->shdr.sh_size / sizeof(Elf_Sym); in read_symtabs() 493 sec->symtab = malloc(sec->shdr.sh_size); in read_symtabs() [all …]
|
| /linux/arch/s390/tools/ |
| H A D | relocs.c | 172 shnum = elf_xword_to_cpu(shdr.sh_size); in read_ehdr() 207 sec->shdr.sh_size = elf_xword_to_cpu(shdr.sh_size); in read_shdrs() 229 sec->reltab = malloc(sec->shdr.sh_size); in read_relocs() 231 die("malloc of %" FMT " bytes for relocs failed\n", sec->shdr.sh_size); in read_relocs() 236 if (fread(sec->reltab, 1, sec->shdr.sh_size, fp) != sec->shdr.sh_size) in read_relocs() 239 for (j = 0; j < sec->shdr.sh_size / sizeof(Elf_Rel); j++) { in read_relocs() 310 for (j = 0; j < sec->shdr.sh_size / sizeof(Elf_Rel); j++) { in walk_relocs()
|
| /linux/arch/arm/kernel/ |
| H A D | module.c | 85 for (i = 0; i < relsec->sh_size / sizeof(Elf32_Rel); i++, rel++) { in apply_relocate() 99 if (offset < 0 || offset > (symsec->sh_size / sizeof(Elf32_Sym))) { in apply_relocate() 108 if (rel->r_offset < 0 || rel->r_offset > dstsec->sh_size - sizeof(u32)) { in apply_relocate() 111 rel->r_offset, dstsec->sh_size); in apply_relocate() 444 s->sh_size, in module_finalize() 446 txt_sec->sh_size); in module_finalize() 459 fixup_pv_table((void *)s->sh_addr, s->sh_size); in module_finalize() 464 fixup_smp((void *)s->sh_addr, s->sh_size); in module_finalize()
|
| /linux/arch/loongarch/kernel/ |
| H A D | module-sections.c | 140 int num_rela = sechdrs[i].sh_size / sizeof(Elf_Rela); in module_frob_arch_sections() 158 got_sec->sh_size = (num_gots + 1) * sizeof(struct got_entry); in module_frob_arch_sections() 166 plt_sec->sh_size = (num_plts + 1) * sizeof(struct plt_entry); in module_frob_arch_sections() 174 plt_idx_sec->sh_size = (num_plts + 1) * sizeof(struct plt_idx_entry); in module_frob_arch_sections() 182 tramp->sh_size = NR_FTRACE_PLTS * sizeof(struct plt_entry); in module_frob_arch_sections()
|
| H A D | module.c | 493 num_relocations = sechdrs[relsec].sh_size / sizeof(*rel); in apply_relocate_add() 624 apply_alternatives((void *)alt->sh_addr, (void *)alt->sh_addr + alt->sh_size); in module_finalize() 627 …wind_module_init(mod, (void *)orc_ip->sh_addr, orc_ip->sh_size, (void *)orc->sh_addr, orc->sh_size… in module_finalize()
|
| /linux/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) / _w(symhdr->sh_entsize); in find_secsym_ndx() [all …]
|
| H A D | insert-sys-cert.c | 75 num_sections = x[0].sh_size; in get_offset_from_address() 81 unsigned long end = start + x[i].sh_size; in get_offset_from_address() 144 n = symtab->sh_size / symtab->sh_entsize; in find_elf_symbol() 191 num_sections = x[0].sh_size; in get_symbol_table()
|
| /linux/arch/alpha/kernel/ |
| H A D | module.c | 95 nsyms = symtab->sh_size / sizeof(Elf64_Sym); in module_frob_arch_sections() 104 got->sh_size = 0; in module_frob_arch_sections() 112 nrela = s->sh_size / sizeof(Elf64_Rela); in module_frob_arch_sections() 116 &got->sh_size); in module_frob_arch_sections() 138 unsigned long i, n = sechdrs[relsec].sh_size / sizeof(*rela); in apply_relocate_add()
|
| /linux/drivers/remoteproc/ |
| H A D | remoteproc_elf_loader.c | 376 u64 sh_addr, sh_size; local 385 sh_size = elf_shdr_get_sh_size(class, shdr); 387 if (!rproc_u64_fit_in_size_t(sh_size)) { 389 sh_size); 393 return rproc_da_to_va(rproc, sh_addr, sh_size, NULL);
|
| /linux/kernel/module/ |
| H A D | main.c | 298 *num = info->sechdrs[sec].sh_size / object_size; in section_objs() 327 *num = info->sechdrs[sec].sh_size / object_size; in any_section_objs() 462 if (!pcpusec->sh_size) in percpu_modalloc() 471 mod->percpu = __alloc_reserved_percpu(pcpusec->sh_size, align); in percpu_modalloc() 474 mod->name, (unsigned long)pcpusec->sh_size); in percpu_modalloc() 477 mod->percpu_size = pcpusec->sh_size; in percpu_modalloc() 551 if (info->sechdrs[info->index.pcpu].sh_size != 0) in percpu_modalloc() 1115 unsigned long size = infosec->sh_size; in get_next_modinfo() 1522 for (i = 1; i < symsec->sh_size / sizeof(Elf_Sym); i++) { in simplify_symbols() 1648 mod->mem[type].size = offset + sechdr->sh_size; in module_get_offset_and_type() [all …]
|
| H A D | version.c | 49 num_versions = sechdrs[versindex].sh_size in check_version() 125 start->remaining = sechdrs[crc_idx].sh_size / sizeof(*start->crc); in modversion_ext_start()
|
| /linux/arch/riscv/kernel/ |
| H A D | module-sections.c | 153 size_t num_relas = sechdrs[i].sh_size / sizeof(Elf_Rela); in module_frob_arch_sections() 195 mod->arch.plt.shdr->sh_size = (num_plts + 1) * sizeof(struct plt_entry); in module_frob_arch_sections() 202 mod->arch.got.shdr->sh_size = (num_gots + 1) * sizeof(struct got_entry); in module_frob_arch_sections() 209 mod->arch.got_plt.shdr->sh_size = (num_plts + 1) * sizeof(struct got_entry); in module_frob_arch_sections()
|
| /linux/arch/arm64/kernel/ |
| H A D | module-plts.c | 319 int nents, numrels = sechdrs[i].sh_size / sizeof(Elf64_Rela); in module_frob_arch_sections() 350 pltsec->sh_size = (core_plts + 1) * sizeof(struct plt_entry); in module_frob_arch_sections() 358 pltsec->sh_size = (init_plts + 1) * sizeof(struct plt_entry); in module_frob_arch_sections() 366 tramp->sh_size = NR_FTRACE_PLTS * sizeof(struct plt_entry); in module_frob_arch_sections() 373 init_tramp->sh_size = NR_FTRACE_PLTS * sizeof(struct plt_entry); in module_frob_arch_sections()
|
| H A D | module.c | 245 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add() 493 ret = apply_alternatives_module((void *)s->sh_addr, s->sh_size); in module_finalize() 509 ret = __pi_scs_patch((void *)s->sh_addr, s->sh_size, true); in module_finalize()
|
| /linux/arch/mips/kernel/ |
| H A D | vpe.c | 175 *size = ret + sechdr->sh_size; in get_offset() 438 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocations() 485 unsigned int i, n = sechdrs[symindex].sh_size / sizeof(Elf_Sym); in simplify_symbols() 540 unsigned int i, n = sechdrs[symindex].sh_size / sizeof(Elf_Sym); in dump_elfsymbols() 555 unsigned int i, n = sechdrs[symindex].sh_size / sizeof(Elf_Sym); in find_vpe_symbols() 622 (len < sechdrs[i].sh_offset + sechdrs[i].sh_size)) { in vpe_elfload() 661 sechdrs[i].sh_size); in vpe_elfload()
|
| /linux/tools/lib/bpf/ |
| H A D | linker.c | 350 symtab->shdr->sh_size += sizeof(*sym); in add_new_sym() 424 sec->shdr->sh_size = sec->sec_sz = 0; in init_output_elf() 619 if (shdr->sh_type == SHT_PROGBITS && shdr->sh_size == 0 && in is_ignored_sec() 783 obj->btf = btf__new(data->d_buf, shdr->sh_size); in linker_load_obj_file() 794 obj->btf_ext = btf_ext__new(data->d_buf, shdr->sh_size); in linker_load_obj_file() 867 if (sec->shdr->sh_size != sec->data->d_size) { in linker_sanity_check_elf() 869 sec->sec_idx, (long long unsigned)sec->shdr->sh_size, in linker_sanity_check_elf() 884 if (sec->shdr->sh_size % sizeof(struct bpf_insn) != 0) { in linker_sanity_check_elf() 886 sec->sec_idx, (long long unsigned)sec->shdr->sh_size, in linker_sanity_check_elf() 919 if (sec->shdr->sh_size % sec->shdr->sh_entsize != 0) in linker_sanity_check_elf_symtab() [all …]
|
| /linux/arch/m68k/kernel/ |
| H A D | module.c | 35 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate() 75 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add()
|
| /linux/arch/arc/kernel/ |
| H A D | module.c | 64 n = sechdrs[relsec].sh_size / sizeof(*rel_entry); in apply_relocate_add() 141 sechdrs[unwsec].sh_size); in module_finalize()
|
| /linux/arch/parisc/kernel/ |
| H A D | module.c | 283 unsigned long nrels = sechdrs[i].sh_size / sizeof(*rels); in module_frob_arch_sections() 509 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add() 653 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add() 812 end = table + sechdrs[me->arch.unwind_section].sh_size; in register_unwind_table() 891 nsyms = symhdr->sh_size / sizeof(Elf_Sym); in module_finalize() 908 symhdr->sh_size = nsyms * sizeof(Elf_Sym); in module_finalize() 918 apply_alternatives(aseg, aseg + s->sh_size, me->name); in module_finalize()
|
| /linux/arch/mips/vdso/ |
| H A D | genvdso.h | 51 shdr->sh_entsize = shdr->sh_size; in FUNC() 98 st_count = FUNC(swap_uint)(shdr->sh_size) / st_entsize; in FUNC()
|
| /linux/kernel/ |
| H A D | kexec_file.c | 918 for (k = 0; k < sechdrs[i].sh_size/sizeof(Elf_Sym); k++) { in kexec_purgatory_setup_kbuf() 971 kbuf->bufsz += sechdrs[i].sh_size; in kexec_purgatory_setup_sechdrs() 976 bss_sz += sechdrs[i].sh_size; in kexec_purgatory_setup_sechdrs() 1055 bss_addr += sechdrs[i].sh_size; in kexec_apply_relocations() 1063 entry_off < sechdrs[i].sh_size) { in kexec_apply_relocations() 1081 + sechdrs[i].sh_size) && in kexec_apply_relocations() 1090 memcpy(dst, src, sechdrs[i].sh_size); 1094 offset += sechdrs[i].sh_size;
|
| /linux/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ |
| H A D | gh100.c | 223 (u64)shdr[i].sh_offset + shdr[i].sh_size > length) in elf_validate_sections() 229 u32 crc32 = crc32_le(~0, elf + shdr[i].sh_offset, shdr[i].sh_size) ^ ~0; in elf_validate_sections() 254 *len = shdr[i].sh_size; in elf_section()
|