Home
last modified time | relevance | path

Searched refs:sh_size (Results 1 – 25 of 90) sorted by relevance

1234

/OK3568_Linux_fs/yocto/poky/scripts/
H A Drelocate_sdk.py124 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 …]
/OK3568_Linux_fs/kernel/arch/powerpc/kernel/
H A Dmodule.c49 (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 Dmodule_32.c97 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 Dmodule_64.c208 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()
/OK3568_Linux_fs/kernel/arch/x86/kernel/
H A Dmodule.c102 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()
283 apply_retpolines(rseg, rseg + retpolines->sh_size); in module_finalize()
287 apply_returns(rseg, rseg + returns->sh_size); in module_finalize()
292 apply_alternatives(aseg, aseg + alt->sh_size); in module_finalize()
298 lseg, lseg + locks->sh_size, in module_finalize()
299 tseg, tseg + text->sh_size); in module_finalize()
304 apply_paravirt(pseg, pseg + para->sh_size); in module_finalize()
311 unwind_module_init(me, (void *)orc_ip->sh_addr, orc_ip->sh_size, in module_finalize()
312 (void *)orc->sh_addr, orc->sh_size); in module_finalize()
/OK3568_Linux_fs/kernel/arch/mips/boot/tools/
H A Drelocs.c284 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 …]
/OK3568_Linux_fs/kernel/arch/x86/tools/
H A Drelocs.c287 nsyms = sec->shdr.sh_size/sizeof(Elf_Sym); in sym_lookup()
399 shnum = elf_xword_to_cpu(shdr.sh_size); in read_ehdr()
433 sec->shdr.sh_size = elf_xword_to_cpu(shdr.sh_size); in read_shdrs()
452 sec->strtab = malloc(sec->shdr.sh_size); in read_strtabs()
455 sec->shdr.sh_size); in read_strtabs()
461 if (fread(sec->strtab, 1, sec->shdr.sh_size, fp) in read_strtabs()
462 != sec->shdr.sh_size) { in read_strtabs()
477 sec->symtab = malloc(sec->shdr.sh_size); in read_symtabs()
480 sec->shdr.sh_size); in read_symtabs()
486 if (fread(sec->symtab, 1, sec->shdr.sh_size, fp) in read_symtabs()
[all …]
/OK3568_Linux_fs/kernel/arch/nds32/kernel/
H A Dmodule.c123 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()
/OK3568_Linux_fs/kernel/arch/ia64/kernel/
H A Dmodule.c453 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 …]
/OK3568_Linux_fs/kernel/scripts/
H A Dsorttable.h233 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 Drecordmcount.h214 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 Dinsert-sys-cert.c75 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()
/OK3568_Linux_fs/kernel/arch/arm/kernel/
H A Dmodule.c81 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()
393 maps[i].unw_sec->sh_size, in module_finalize()
395 maps[i].txt_sec->sh_size); in module_finalize()
400 fixup_pv_table((void *)s->sh_addr, s->sh_size); in module_finalize()
405 fixup_smp((void *)s->sh_addr, s->sh_size); in module_finalize()
H A Dmodule-plts.c88 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()
/OK3568_Linux_fs/u-boot/cmd/
H A Delf.c80 shdr->sh_addr == 0 || shdr->sh_size == 0) { in load_elf_image_shdr()
89 (long)shdr->sh_size); in load_elf_image_shdr()
94 shdr->sh_size); in load_elf_image_shdr()
98 (const void *)image, shdr->sh_size); in load_elf_image_shdr()
100 flush_cache(shdr->sh_addr, shdr->sh_size); in load_elf_image_shdr()
/OK3568_Linux_fs/kernel/arch/alpha/kernel/
H A Dmodule.c95 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()
/OK3568_Linux_fs/kernel/arch/sparc/kernel/
H A Dmodule.c74 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()
/OK3568_Linux_fs/kernel/drivers/remoteproc/
H A Dremoteproc_elf_loader.c372 u64 sh_addr, sh_size; local
381 sh_size = elf_shdr_get_sh_size(class, shdr);
383 if (!rproc_u64_fit_in_size_t(sh_size)) {
385 sh_size);
389 return rproc_da_to_va(rproc, sh_addr, sh_size, NULL);
/OK3568_Linux_fs/kernel/arch/riscv/kernel/
H A Dmodule-sections.c125 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()
/OK3568_Linux_fs/buildroot/package/patchelf/
H A D0010-Fix-endianness-issues-for-powerpc-PIE.patch15 reading sh_offset and sh_size in incorrect endianness
54 memset(contents + rdi(shdr.sh_offset), 'X', rdi(shdr.sh_size));
64 - replaceSection(getSectionName(shdrs[i]), shdrs[i].sh_size);
65 + replaceSection(getSectionName(shdrs[i]), rdi(shdrs[i].sh_size));
H A D0009-Fix-issue-66-by-ignoring-the-first-section-header-wh.patch33 - memset(contents + rdi(shdr.sh_offset), 'X', rdi(shdr.sh_size));
35 + memset(contents + rdi(shdr.sh_offset), 'X', rdi(shdr.sh_size));
/OK3568_Linux_fs/u-boot/tools/
H A Dimg2srec.c287 getPtr = ExtractLong((uint32_t *)&sectHeader[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()
/OK3568_Linux_fs/kernel/arch/mips/kernel/
H A Dvpe.c174 *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()
/OK3568_Linux_fs/kernel/arch/s390/kernel/
H A Dmodule.c133 me->arch.nsyms = symtab->sh_size / sizeof(Elf_Sym); in module_frob_arch_sections()
157 nrela = sechdrs[i].sh_size / sizeof(Elf_Rela); in module_frob_arch_sections()
444 n = sechdrs[relsec].sh_size / sizeof(Elf_Rela); in __apply_relocate_add()
500 apply_alternatives(aseg, aseg + s->sh_size); in module_finalize()
504 nospec_revert(aseg, aseg + s->sh_size); in module_finalize()
508 nospec_revert(aseg, aseg + s->sh_size); in module_finalize()
/OK3568_Linux_fs/kernel/tools/objtool/
H A Delf.c312 if (sec->sh.sh_size != 0) { in read_sections()
319 sec->data->d_size != sec->sh.sh_size) { in read_sections()
325 sec->len = sec->sh.sh_size; in read_sections()
397 symbols_nr = symtab->sh.sh_size / symtab->sh.sh_entsize; in read_symbols()
633 symtab->sh.sh_size += entsize; in elf_update_symbol()
642 symtab_shndx->sh.sh_size += sizeof(Elf32_Word); in elf_update_symbol()
726 new_idx = symtab->sh.sh_size / symtab->sh.sh_entsize; in elf_create_section_symbol()
833 for (i = 0; i < sec->sh.sh_size / sec->sh.sh_entsize; i++) { in read_relocs()
1034 sec->sh.sh_size = size; in elf_create_section()
1149 sec->sh.sh_size = size; in elf_rebuild_rel_reloc_section()
[all …]

1234