Home
last modified time | relevance | path

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

123

/freebsd-9-stable/lib/libelf/
Delf_data.c45 uint64_t sh_align, sh_offset, sh_size; in elf_getdata() local
72 sh_size = (uint64_t) s->s_shdr.s_shdr32.sh_size; in elf_getdata()
77 sh_size = s->s_shdr.s_shdr64.sh_size; in elf_getdata()
88 sh_offset + sh_size > (uint64_t) e->e_rawsize)) { in elf_getdata()
99 if (sh_size % fsz) { in elf_getdata()
104 count = sh_size / fsz; in elf_getdata()
120 if (sh_type == SHT_NOBITS || sh_size == 0) { in elf_getdata()
194 uint64_t sh_align, sh_offset, sh_size; in elf_rawdata() local
215 sh_size = (uint64_t) s->s_shdr.s_shdr32.sh_size; in elf_rawdata()
220 sh_size = s->s_shdr.s_shdr64.sh_size; in elf_rawdata()
[all …]
Delf_update.c95 uint64_t sh_align, sh_entsize, sh_offset, sh_size; in _libelf_compute_section_extents() local
107 sh_size = (uint64_t) shdr32->sh_size; in _libelf_compute_section_extents()
113 sh_size = shdr64->sh_size; in _libelf_compute_section_extents()
223 sh_size < scn_size) { in _libelf_compute_section_extents()
250 sh_size = scn_size; in _libelf_compute_section_extents()
266 shdr32->sh_size = (uint32_t) sh_size; in _libelf_compute_section_extents()
271 shdr64->sh_size = sh_size; in _libelf_compute_section_extents()
278 s->s_size = sh_size; in _libelf_compute_section_extents()
592 uint64_t sh_off, sh_size; in _libelf_write_scn() local
598 sh_size = (uint64_t) s->s_shdr.s_shdr32.sh_size; in _libelf_write_scn()
[all …]
Dgelf_shdr.c77 d->sh_size = (Elf64_Xword) sh32->sh_size; in gelf_getshdr()
124 LIBELF_COPY_U32(sh32, s, sh_size); in gelf_update_shdr()
Dlibelf_extended.c61 scn->s_shdr.s_shdr32.sh_size = shnum; in _libelf_setshnum()
63 scn->s_shdr.s_shdr64.sh_size = shnum; in _libelf_setshnum()
/freebsd-9-stable/sys/arm/arm/
Delf_trampoline.c440 shdr[i].sh_size <= in load_kernel()
444 shdr[i].sh_size = 0; in load_kernel()
449 shdr[i].sh_size != 0) { in load_kernel()
461 shdr[symtabindex].sh_size); in load_kernel()
463 shdr[symtabindex].sh_size), in load_kernel()
465 kstart), shdr[symstrindex].sh_size); in load_kernel()
467 lastaddr += shdr[symtabindex].sh_size; in load_kernel()
469 sizeof(shdr[symtabindex].sh_size)); in load_kernel()
470 lastaddr += sizeof(shdr[symstrindex].sh_size); in load_kernel()
471 lastaddr += shdr[symstrindex].sh_size; in load_kernel()
[all …]
/freebsd-9-stable/sys/mips/mips/
Delf_trampoline.c141 shdr[i].sh_size != 0) { in load_kernel()
176 tmp = shdr[symtabindex].sh_size + in load_kernel()
177 shdr[symstrindex].sh_size + 2*sizeof(Elf_Size); in load_kernel()
181 tmp = shdr[symtabindex].sh_size; in load_kernel()
183 lastaddr += sizeof(shdr[symtabindex].sh_size); in load_kernel()
187 shdr[symtabindex].sh_size); in load_kernel()
188 lastaddr += shdr[symtabindex].sh_size; in load_kernel()
191 tmp = shdr[symstrindex].sh_size; in load_kernel()
193 lastaddr += sizeof(shdr[symstrindex].sh_size); in load_kernel()
198 shdr[symstrindex].sh_size); in load_kernel()
/freebsd-9-stable/sys/kern/
Dlink_elf_obj.c316 ef->ddbsymcnt = shdr[symtabindex].sh_size / sizeof(Elf_Sym); in link_elf_link_preload()
318 ef->ddbstrcnt = shdr[symstrindex].sh_size; in link_elf_link_preload()
320 ef->shstrcnt = shdr[shstrindex].sh_size; in link_elf_link_preload()
343 ef->progtab[pb].size = shdr[i].sh_size; in link_elf_link_preload()
352 dpcpu = dpcpu_alloc(shdr[i].sh_size); in link_elf_link_preload()
359 dpcpu_copy(dpcpu, shdr[i].sh_size); in link_elf_link_preload()
366 vnet_data = vnet_data_alloc(shdr[i].sh_size); in link_elf_link_preload()
373 vnet_data_copy(vnet_data, shdr[i].sh_size); in link_elf_link_preload()
389 ef->reltab[rl].nrel = shdr[i].sh_size / sizeof(Elf_Rel); in link_elf_link_preload()
396 shdr[i].sh_size / sizeof(Elf_Rela); in link_elf_link_preload()
[all …]
Dkern_ctf.c176 if ((shstrtab = malloc(shdr[hdr->e_shstrndx].sh_size, M_LINKER, in link_elf_ctf_get()
184 shdr[hdr->e_shstrndx].sh_size, shdr[hdr->e_shstrndx].sh_offset, in link_elf_ctf_get()
243 if ((raw = malloc(shdr[i].sh_size, M_LINKER, M_WAITOK)) == NULL) { in link_elf_ctf_get()
252 sz = shdr[i].sh_size; in link_elf_ctf_get()
269 shdr[i].sh_size, shdr[i].sh_offset, UIO_SYSSPACE, IO_NODELOCKED, in link_elf_ctf_get()
294 zs.avail_in = shdr[i].sh_size - sizeof(ctf_hdr); in link_elf_ctf_get()
307 ef->ctfcnt = shdr[i].sh_size; in link_elf_ctf_get()
/freebsd-9-stable/usr.sbin/kldxref/
Def_obj.c440 ef->ddbsymcnt = shdr[symtabindex].sh_size / sizeof(Elf_Sym); in ef_obj_open()
442 shdr[symtabindex].sh_size, (void**)&ef->ddbsymtab) != 0) { in ef_obj_open()
447 ef->ddbstrcnt = shdr[symstrindex].sh_size; in ef_obj_open()
449 shdr[symstrindex].sh_size, (void**)&ef->ddbstrtab) != 0) { in ef_obj_open()
459 ef->shstrcnt = shdr[shstrindex].sh_size; in ef_obj_open()
461 shdr[shstrindex].sh_size, (void**)&ef->shstrtab) != 0) { in ef_obj_open()
480 mapsize += shdr[i].sh_size; in ef_obj_open()
512 shdr[i].sh_size, in ef_obj_open()
519 bzero(ef->progtab[pb].addr, shdr[i].sh_size); in ef_obj_open()
521 ef->progtab[pb].size = shdr[i].sh_size; in ef_obj_open()
[all …]
/freebsd-9-stable/cddl/contrib/opensolaris/tools/ctf/cvt/
Doutput.c357 nent = shdr.sh_size / shdr.sh_entsize; in sort_iidescs()
607 ddata->d_buf = xmalloc(ddata->d_size + shdr.sh_size + in write_file()
609 bcopy(sdata->d_buf, ddata->d_buf, shdr.sh_size); in write_file()
610 strcpy((caddr_t)ddata->d_buf + shdr.sh_size, in write_file()
612 ctfnameoff = (off_t)shdr.sh_size; in write_file()
613 shdr.sh_size += seclen + 1; in write_file()
621 int nsym = shdr.sh_size / shdr.sh_entsize; in write_file()
625 ddata->d_buf = xmalloc(shdr.sh_size); in write_file()
626 bcopy(sdata->d_buf, ddata->d_buf, shdr.sh_size); in write_file()
650 ddata->d_buf = xmalloc(shdr.sh_size); in write_file()
[all …]
/freebsd-9-stable/sys/boot/common/
Dload_elf_obj.c226 if (shdr[i].sh_size == 0) in __elfN()
236 lastaddr += shdr[i].sh_size; in __elfN()
249 lastaddr += shdr[i].sh_size; in __elfN()
260 lastaddr += shdr[ef->symtabindex].sh_size; in __elfN()
271 lastaddr += shdr[symstrindex].sh_size; in __elfN()
283 lastaddr += shdr[ef->shstrindex].sh_size; in __elfN()
292 lastaddr += shdr[i].sh_size; in __elfN()
328 cshdr->sh_size, (off_t)cshdr->sh_offset) != 0) { in __elfN()
453 *stopp = shdr[i].sh_addr + shdr[i].sh_size; in __elfN()
491 shdr[shdr[i].sh_info].sh_size) in __elfN()
[all …]
Dload_elf.c397 (shdr[i].sh_offset + shdr[i].sh_size <= in __elfN()
400 shdr[i].sh_size = 0; in __elfN()
404 if (shdr[i].sh_offset == 0 || shdr[i].sh_size == 0) in __elfN()
435 size = shdr[i].sh_size; in __elfN()
441 (uintmax_t)shdr[i].sh_size, (uintmax_t)shdr[i].sh_offset, in __elfN()
442 (uintmax_t)lastaddr, (uintmax_t)(lastaddr + shdr[i].sh_size)); in __elfN()
455 result = archsw.arch_readin(ef->fd, lastaddr, shdr[i].sh_size); in __elfN()
456 if (result < 0 || (size_t)result != shdr[i].sh_size) { in __elfN()
458 (uintmax_t)shdr[i].sh_size); in __elfN()
464 lastaddr += shdr[i].sh_size; in __elfN()
/freebsd-9-stable/cddl/contrib/opensolaris/lib/libdtrace/common/
Ddt_link.c77 dt_write(dtp, fd, (data), elf_file.shdr[(index)].sh_size) != \
78 elf_file.shdr[(index)].sh_size)
553 shp->sh_size = sizeof (DTRACE_SHSTRTAB32); in dump_elf32()
555 off = P2ROUNDUP(shp->sh_offset + shp->sh_size, 8); in dump_elf32()
562 shp->sh_size = dof->dofh_filesz; in dump_elf32()
564 off = shp->sh_offset + shp->sh_size; in dump_elf32()
571 shp->sh_size = de.de_strlen; in dump_elf32()
573 off = P2ROUNDUP(shp->sh_offset + shp->sh_size, 4); in dump_elf32()
583 shp->sh_size = de.de_nsym * sizeof (Elf32_Sym); in dump_elf32()
585 off = P2ROUNDUP(shp->sh_offset + shp->sh_size, 4); in dump_elf32()
[all …]
/freebsd-9-stable/usr.sbin/crunch/crunchide/
Dexec_elf32.c312 shdrshdr.sh_size = htoxew(shdrsize); in ELFNAMEEND()
344 if ((shstrtabp = xmalloc(xewtoh(shstrtabshdr->sh_size), fn, in ELFNAMEEND()
348 xewtoh(shstrtabshdr->sh_size), fn) != xewtoh(shstrtabshdr->sh_size)) in ELFNAMEEND()
369 size = xewtoh(layoutp[i].shdr->sh_size); in ELFNAMEEND()
395 nsyms = xewtoh(symtabshdr->sh_size) / xewtoh(symtabshdr->sh_entsize); in ELFNAMEEND()
431 strtabshdr->sh_size = htoxew(nstrtab_nextoff); in ELFNAMEEND()
439 xewtoh(layoutp[i - 1].shdr->sh_size); in ELFNAMEEND()
475 size = xewtoh(layoutp[i].shdr->sh_size); in ELFNAMEEND()
/freebsd-9-stable/cddl/contrib/opensolaris/lib/libctf/common/
Dctf_lib.c170 dst->sh_size = src->sh_size; in shdr_to_gelf()
339 strs_mapsz = sp[hdr.e64.e_shstrndx].sh_size + in ctf_fdopen()
364 if (shp->sh_name >= sp[hdr.e64.e_shstrndx].sh_size || in ctf_fdopen()
365 lhp->sh_name >= sp[hdr.e64.e_shstrndx].sh_size) in ctf_fdopen()
373 ctfsect.cts_size = shp->sh_size; in ctf_fdopen()
381 symsect.cts_size = shp->sh_size; in ctf_fdopen()
388 strsect.cts_size = lhp->sh_size; in ctf_fdopen()
/freebsd-9-stable/contrib/llvm/include/llvm/Object/
DELF.h360 (const char *)(base() + sec->sh_offset + sec->sh_size)); in end_rela()
370 (const char *)(base() + sec->sh_offset + sec->sh_size)); in end_rel()
423 unsigned vd_size = sec->sh_size; // Size of section in bytes in LoadVersionDefs()
448 unsigned vn_size = sec->sh_size; // Size of section in bytes in LoadVersionNeeds()
526 if (Sec->sh_offset + Sec->sh_size > Buf->getBufferSize()) in getSectionContents()
529 return ArrayRef<uint8_t>(Start, Sec->sh_size); in getSectionContents()
578 if (strtab[sh->sh_size - 1] != 0) in VerifyStrTab()
588 return SectionHeaderTable->sh_size; in getNumSections()
665 DynSymRegion.Size = SecI->sh_size; in ELFFile()
669 DynStrRegion.Size = DynStr->sh_size; in ELFFile()
[all …]
DELFTypes.h117 Elf_Word sh_size; // Size of section, in bytes
132 Elf_Xword sh_size; // Size of section, in bytes
142 using Elf_Shdr_Base<ELFT>::sh_size;
148 return sh_size / sh_entsize;
/freebsd-9-stable/contrib/binutils/binutils/
Dreadelf.c3234 printf (" (%ld)", (long) section_headers[0].sh_size); in process_file_header()
3251 elf_header.e_shnum = section_headers[0].sh_size; in process_file_header()
3513 if (sec == NULL || sec->sh_size == 0) in process_program_headers()
3523 dynamic_size = sec->sh_size; in process_program_headers()
3656 internal->sh_size = BYTE_GET (shdrs[i].sh_size); in get_32bit_section_headers()
3696 internal->sh_size = BYTE_GET (shdrs[i].sh_size); in get_64bit_section_headers()
3719 esyms = get_data (NULL, file, section->sh_offset, 1, section->sh_size, in get_32bit_elf_symbols()
3730 1, symtab_shndx_hdr->sh_size, _("symtab shndx")); in get_32bit_elf_symbols()
3738 number = section->sh_size / section->sh_entsize; in get_32bit_elf_symbols()
3782 esyms = get_data (NULL, file, section->sh_offset, 1, section->sh_size, in get_64bit_elf_symbols()
[all …]
/freebsd-9-stable/contrib/binutils/bfd/
Delfcode.h307 dst->sh_size = H_GET_WORD (abfd, src->sh_size); in elf_swap_shdr_in()
330 H_PUT_WORD (abfd, src->sh_size, dst->sh_size); in elf_swap_shdr_out()
694 i_ehdrp->e_shnum = i_shdr.sh_size; in elf_object_p()
695 if (i_ehdrp->e_shnum != i_shdr.sh_size in elf_object_p()
788 if (i_shdrp[shindex].sh_size != 0 in elf_object_p()
952 rela_hdr->sh_size = rela_hdr->sh_entsize * sec->reloc_count; in elf_write_relocs()
953 rela_hdr->contents = bfd_alloc (abfd, rela_hdr->sh_size); in elf_write_relocs()
1076 i_shdrp[0]->sh_size = i_ehdrp->e_shnum; in elf_write_shdrs_and_ehdr()
1155 symcount = hdr->sh_size / sizeof (Elf_External_Sym); in elf_slurp_symbol_table()
1173 && verhdr->sh_size / sizeof (Elf_External_Versym) != symcount) in elf_slurp_symbol_table()
[all …]
Delf64-sparc.c66 allocated = (PTR) bfd_malloc (rel_hdr->sh_size); in elf64_sparc_slurp_one_reloc_table()
71 || bfd_bread (allocated, rel_hdr->sh_size, abfd) != rel_hdr->sh_size) in elf64_sparc_slurp_one_reloc_table()
81 count = rel_hdr->sh_size / entsize; in elf64_sparc_slurp_one_reloc_table()
329 rela_hdr->sh_size = rela_hdr->sh_entsize * count; in elf64_sparc_write_relocs()
330 rela_hdr->contents = (PTR) bfd_alloc (abfd, rela_hdr->sh_size); in elf64_sparc_write_relocs()
Delf.c269 shstrtabsize = i_shdrp[shindex]->sh_size; in bfd_elf_get_str_section()
309 if (strindex >= hdr->sh_size) in bfd_elf_string_from_elf_section()
314 abfd, strindex, (unsigned long) hdr->sh_size, in bfd_elf_string_from_elf_section()
379 if (shndx_hdr == NULL || shndx_hdr->sh_size == 0) in bfd_elf_get_elf_syms()
516 && (shdr)->sh_size >= (2 * GRP_ENTRY_SIZE) \ in setup_group()
518 && ((shdr)->sh_size % GRP_ENTRY_SIZE) == 0) in setup_group()
561 amt = shdr->sh_size * sizeof (*dest) / 4; in setup_group()
562 shdr->contents = bfd_alloc2 (abfd, shdr->sh_size, in setup_group()
568 (_("%B: Corrupt size field in group section header: 0x%lx"), abfd, shdr->sh_size); in setup_group()
576 || (bfd_bread (shdr->contents, shdr->sh_size, abfd) in setup_group()
[all …]
/freebsd-9-stable/contrib/binutils/include/elf/
Dinternal.h83 bfd_size_type sh_size; /* Size of section in bytes */ member
266 || segment->p_type == PT_TLS) ? sec_hdr->sh_size : 0)
291 (sec_hdr->sh_size > 0 \
Dexternal.h106 unsigned char sh_size[4]; /* Size of section in bytes */ member
119 unsigned char sh_size[8]; /* Size of section in bytes */ member
/freebsd-9-stable/sys/boot/i386/gptboot/
Dgptboot.c320 memcpy(p, &es[i].sh_size, sizeof(es[i].sh_size)); in load()
321 p += sizeof(es[i].sh_size); in load()
323 if (xfsread(ino, p, es[i].sh_size)) in load()
325 p += es[i].sh_size; in load()
/freebsd-9-stable/sys/cddl/contrib/opensolaris/uts/common/ctf/
Dctf_mod.c141 symsect.cts_size = mp->symhdr->sh_size; in ctf_modopen()
153 strsect.cts_size = mp->strhdr->sh_size; in ctf_modopen()

123