/openbmc/openbmc/poky/scripts/ |
H A D | relocate_sdk.py | 124 sh_offset, sh_size = struct.unpack(endian_prefix + "16xII16x", sh_hdr) 126 sh_offset, sh_size = struct.unpack(endian_prefix + "24xQQ24x", sh_hdr) 129 sh_strtab = f.read(sh_size) 138 sh_name, sh_type, sh_flags, sh_addr, sh_offset, sh_size, sh_link,\ 149 sysdirs = f.read(sh_size) 151 sysdirs_sect_size = sh_size 153 sysdirslen = f.read(sh_size) 156 ldsocache_path = f.read(sh_size) 159 if (len(new_ldsocache_path) >= sh_size): 161 % (elf_file_name, sh_size, len(new_ldsocache_path))) [all …]
|
/openbmc/linux/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 …]
|
/openbmc/linux/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()
|
/openbmc/linux/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() 341 for (j = 0; j < sec->shdr.sh_size/sizeof(Elf_Sym); j++) { in read_symtabs() [all …]
|
/openbmc/linux/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() 515 if (fread(sec->xsymtab, 1, sec->shdr.sh_size, fp) in read_symtabs() [all …]
|
/openbmc/u-boot/cmd/ |
H A D | elf.c | 99 shdr->sh_addr == 0 || shdr->sh_size == 0) { in load_elf64_image_shdr() 108 (long)shdr->sh_size); in load_elf64_image_shdr() 113 shdr->sh_size); in load_elf64_image_shdr() 117 (const void *)image, shdr->sh_size); in load_elf64_image_shdr() 120 roundup((shdr->sh_addr + shdr->sh_size), in load_elf64_image_shdr() 204 shdr->sh_addr == 0 || shdr->sh_size == 0) { in load_elf_image_shdr() 213 (long)shdr->sh_size); in load_elf_image_shdr() 218 shdr->sh_size); in load_elf_image_shdr() 222 (const void *)image, shdr->sh_size); in load_elf_image_shdr() 225 roundup((shdr->sh_addr + shdr->sh_size), in load_elf_image_shdr()
|
/openbmc/linux/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() 549 plt_end = (void *) plt + mod->arch.init_plt->sh_size; in get_plt() 552 plt_end = (void *) plt + mod->arch.core_plt->sh_size; in get_plt() [all …]
|
/openbmc/linux/arch/arm/kernel/ |
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()
|
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()
|
/openbmc/linux/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()
|
/openbmc/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 | sorttable.h | 307 shnum = _r(&shdr[0].sh_size); in do_sort() 324 relocs_size = _r(&s->sh_size); in do_sort() 344 orc_ip_size = s->sh_size; in do_sort() 349 orc_size = s->sh_size; in do_sort() 420 custom_sort(extab_image, _r(&extab_sec->sh_size)); in do_sort() 422 int num_entries = _r(&extab_sec->sh_size) / extable_ent_size; in do_sort() 433 sym < sym + _r(&symtab_sec->sh_size) / sizeof(Elf_Sym); in do_sort()
|
/openbmc/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()
|
/openbmc/linux/arch/sparc/kernel/ |
H A D | module.c | 74 for (i = 1; i < sechdrs[symidx].sh_size / sizeof(Elf_Sym); i++) { in module_frob_arch_sections() 95 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocate_add() 199 sun4v_patch_1insn_range(p, p + sun4v_1insn->sh_size); in do_patch_sections() 203 sun4v_patch_2insn_range(p, p + sun4v_2insn->sh_size); in do_patch_sections()
|
/openbmc/linux/arch/riscv/kernel/ |
H A D | module-sections.c | 125 int num_rela = sechdrs[i].sh_size / sizeof(Elf_Rela); in module_frob_arch_sections() 141 mod->arch.plt.shdr->sh_size = (num_plts + 1) * sizeof(struct plt_entry); in module_frob_arch_sections() 148 mod->arch.got.shdr->sh_size = (num_gots + 1) * sizeof(struct got_entry); in module_frob_arch_sections() 155 mod->arch.got_plt.shdr->sh_size = (num_plts + 1) * sizeof(struct got_entry); in module_frob_arch_sections()
|
/openbmc/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);
|
/openbmc/linux/arch/x86/entry/vdso/ |
H A D | vdso2c.h | 33 len = (size_t)GET_LE(&sec->sh_size); in BITSFUNC() 125 syms_nr = GET_LE(&symtab_hdr->sh_size) / GET_LE(&symtab_hdr->sh_entsize); in BITSFUNC() 207 (unsigned long)GET_LE(&alt_sec->sh_size)); in BITSFUNC() 213 (unsigned long)GET_LE(&extable_sec->sh_size)); in BITSFUNC()
|
/openbmc/qemu/bsd-user/ |
H A D | elfload.c | 91 bswaptls(&shdr->sh_size); in bswap_shdr() 426 syms = malloc(symtab.sh_size); in load_symbols() 431 s->disas_strtab = strings = malloc(strtab.sh_size); in load_symbols() 439 if (read(fd, syms, symtab.sh_size) != symtab.sh_size) { in load_symbols() 446 nsyms = symtab.sh_size / sizeof(struct elf_sym); in load_symbols() 486 if (read(fd, strings, strtab.sh_size) != strtab.sh_size) { in load_symbols()
|
/openbmc/u-boot/tools/ |
H A D | zynqmpbif.c | 560 if (!shdr->sh_size || !shdr->sh_addr || in elf2flat64() 567 if ((le64_to_cpu(shdr->sh_addr) + le64_to_cpu(shdr->sh_size)) > in elf2flat64() 570 le64_to_cpu(shdr->sh_size); in elf2flat64() 584 if (!shdr->sh_size || !shdr->sh_addr || in elf2flat64() 589 memcpy(dst, src, le64_to_cpu(shdr->sh_size)); in elf2flat64() 608 if (!shdr->sh_size || !shdr->sh_addr || in elf2flat32() 615 if ((le32_to_cpu(shdr->sh_addr) + le32_to_cpu(shdr->sh_size)) > in elf2flat32() 618 le32_to_cpu(shdr->sh_size); in elf2flat32() 632 if (!shdr->sh_size || !shdr->sh_addr || in elf2flat32() 637 memcpy(dst, src, le32_to_cpu(shdr->sh_size)); in elf2flat32()
|
H A D | img2srec.c | 287 getPtr = ExtractLong((uint32_t *)§Header[i].sh_size, getPtr); in ConvertELF() 313 && (sectHeader[i].sh_size != 0) in ConvertELF() 315 loadSize = sectHeader[i].sh_size; in ConvertELF() 328 loadSize = sectHeader[i].sh_size; in ConvertELF()
|
/openbmc/linux/arch/s390/kernel/ |
H A D | module.c | 166 me->arch.nsyms = symtab->sh_size / sizeof(Elf_Sym); in module_frob_arch_sections() 190 nrela = sechdrs[i].sh_size / sizeof(Elf_Rela); in module_frob_arch_sections() 479 n = sechdrs[relsec].sh_size / sizeof(Elf_Rela); in __apply_relocate_add() 511 size = FTRACE_HOTPATCH_TRAMPOLINES_SIZE(s->sh_size); in module_alloc_ftrace_hotpatch_trampolines() 556 apply_alternatives(aseg, aseg + s->sh_size); in module_finalize() 560 nospec_revert(aseg, aseg + s->sh_size); in module_finalize() 564 nospec_revert(aseg, aseg + s->sh_size); in module_finalize()
|
/openbmc/linux/arch/mips/kernel/ |
H A D | vpe.c | 174 *size = ret + sechdr->sh_size; in get_offset() 437 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocations() 484 unsigned int i, n = sechdrs[symindex].sh_size / sizeof(Elf_Sym); in simplify_symbols() 539 unsigned int i, n = sechdrs[symindex].sh_size / sizeof(Elf_Sym); in dump_elfsymbols() 554 unsigned int i, n = sechdrs[symindex].sh_size / sizeof(Elf_Sym); in find_vpe_symbols() 621 (len < sechdrs[i].sh_offset + sechdrs[i].sh_size)) { in vpe_elfload() 660 sechdrs[i].sh_size); in vpe_elfload()
|
/openbmc/linux/arch/arm64/kernel/ |
H A D | module-plts.c | 317 int nents, numrels = sechdrs[i].sh_size / sizeof(Elf64_Rela); in module_frob_arch_sections() 348 pltsec->sh_size = (core_plts + 1) * sizeof(struct plt_entry); in module_frob_arch_sections() 356 pltsec->sh_size = (init_plts + 1) * sizeof(struct plt_entry); in module_frob_arch_sections() 364 tramp->sh_size = NR_FTRACE_PLTS * sizeof(struct plt_entry); in module_frob_arch_sections()
|