/illumos-gate/usr/src/lib/libproc/common/ |
H A D | Psymtab_machelf32.c | 498 sp->sh_size = sizeof (shstr); in fake_elf64() 505 off += roundup(sp->sh_size, SH_ADDRALIGN); in fake_elf64() 519 sp->sh_size = ldynsym_size; in fake_elf64() 522 sp->sh_info = sp->sh_size / sizeof (Sym); in fake_elf64() 526 if (Pread(P, &elfdata[off], sp->sh_size, in fake_elf64() 527 sp->sh_addr) != sp->sh_size) { in fake_elf64() 532 off += sp->sh_size; in fake_elf64() 547 sp->sh_size = dynsym_size; in fake_elf64() 553 if (Pread(P, &elfdata[off], sp->sh_size, in fake_elf64() 554 sp->sh_addr) != sp->sh_size) { in fake_elf64() [all …]
|
H A D | Pcore.c | 1520 size = base + symtab->sh_size + strtab->sh_size; in fake_up_symtab() 1537 b->shdr[1].sh_size = symtab->sh_size; in fake_up_symtab() 1545 if (pread64(P->asfd, &b->data[off], b->shdr[1].sh_size, in fake_up_symtab() 1546 symtab->sh_offset) != b->shdr[1].sh_size) { in fake_up_symtab() 1552 off += b->shdr[1].sh_size; in fake_up_symtab() 1555 b->shdr[2].sh_size = strtab->sh_size; in fake_up_symtab() 1561 if (pread64(P->asfd, &b->data[off], b->shdr[2].sh_size, in fake_up_symtab() 1562 strtab->sh_offset) != b->shdr[2].sh_size) { in fake_up_symtab() 1568 off += b->shdr[2].sh_size; in fake_up_symtab() 1586 size = base + symtab->sh_size + strtab->sh_size; in fake_up_symtab() [all …]
|
/illumos-gate/usr/src/lib/libc/port/sys/ |
H A D | sharefs.c | 55 sh->sh_size = i; in _sharefs() 58 sh->sh_size += j; in _sharefs() 62 sh->sh_size += j; in _sharefs() 66 sh->sh_size += j; in _sharefs() 70 sh->sh_size += j; in _sharefs()
|
/illumos-gate/usr/src/lib/libm/common/m9x/ |
H A D | __fex_sym.c | 165 if (i == h.e_shnum || sh[i].sh_size == 0 || in __fex_read_syms() 169 sh[sh[i].sh_link].sh_size == 0) in __fex_read_syms() 176 size = (int) (sh[i].sh_size + sh[sh[i].sh_link].sh_size); in __fex_read_syms() 192 read(fd, stbuf, sh[i].sh_size) != sh[i].sh_size || in __fex_read_syms() 195 read(fd, stbuf + sh[i].sh_size, sh[sh[i].sh_link].sh_size) != in __fex_read_syms() 196 sh[sh[i].sh_link].sh_size) in __fex_read_syms() 201 nsyms = (int) (sh[i].sh_size / sh[i].sh_entsize); in __fex_read_syms() 202 stoffset = (int) sh[i].sh_size; in __fex_read_syms()
|
/illumos-gate/usr/src/lib/libctf/common/ |
H A D | ctf_elfwrite.c | 214 strdatasz = ddata->d_size + shdr.sh_size + in ctf_write_elf() 221 bcopy(sdata->d_buf, ddata->d_buf, shdr.sh_size); in ctf_write_elf() 222 (void) strcpy((caddr_t)ddata->d_buf + shdr.sh_size, in ctf_write_elf() 224 ctfnameoff = (off_t)shdr.sh_size; in ctf_write_elf() 225 shdr.sh_size += seclen + 1; in ctf_write_elf() 233 int nsym = shdr.sh_size / shdr.sh_entsize; in ctf_write_elf() 237 symdatasz = shdr.sh_size; in ctf_write_elf() 243 (void) bcopy(sdata->d_buf, ddata->d_buf, shdr.sh_size); in ctf_write_elf() 276 new_offset += shdr.sh_size; in ctf_write_elf() 295 shdr.sh_size = fp->ctf_size; in ctf_write_elf() [all …]
|
H A D | ctf_lib.c | 372 dst->sh_size = src->sh_size; in shdr_to_gelf() 519 shnum = x32.sh_size; in ctf_fdcreate_int() 529 shnum = x64.sh_size; in ctf_fdcreate_int() 571 strs_mapsz = sp[shstrndx].sh_size + in ctf_fdcreate_int() 596 if (shp->sh_name >= sp[shstrndx].sh_size || in ctf_fdcreate_int() 597 lhp->sh_name >= sp[shstrndx].sh_size) in ctf_fdcreate_int() 606 ctfsect.cts_size = shp->sh_size; in ctf_fdcreate_int() 614 symsect.cts_size = shp->sh_size; in ctf_fdcreate_int() 621 strsect.cts_size = lhp->sh_size; in ctf_fdcreate_int()
|
/illumos-gate/usr/src/uts/common/fs/sharefs/ |
H A D | sharetab.c | 67 sh->sh_size += shl.shl_##field; /* Debug counting */ 151 ASSERT(sg->sharetab_size >= s->sh_size); in sharefs_remove() 152 sg->sharetab_size -= s->sh_size; in sharefs_remove() 215 sh->sh_size = shl->shl_path + shl->shl_res + in sharefs_add() 218 sh->sh_size = strlen(sh->sh_path) + in sharefs_add() 224 sh->sh_size += 5; in sharefs_add() 245 ASSERT(sg->sharetab_size >= s->sh_size); in sharefs_add() 246 sg->sharetab_size -= s->sh_size; in sharefs_add() 247 sg->sharetab_size += sh->sh_size; in sharefs_add() 273 sg->sharetab_size += sh->sh_size; in sharefs_add()
|
/illumos-gate/usr/src/boot/common/ |
H A D | load_elf_obj.c | 219 if (shdr[i].sh_size == 0) in __elfN() 226 lastaddr += shdr[i].sh_size; in __elfN() 239 lastaddr += shdr[i].sh_size; in __elfN() 250 lastaddr += shdr[ef->symtabindex].sh_size; in __elfN() 261 lastaddr += shdr[symstrindex].sh_size; in __elfN() 273 lastaddr += shdr[ef->shstrindex].sh_size; in __elfN() 282 lastaddr += shdr[i].sh_size; in __elfN() 318 cshdr->sh_size, (off_t)cshdr->sh_offset) != 0) { in __elfN() 444 *stopp = shdr[i].sh_addr + shdr[i].sh_size; in __elfN() 483 shdr[shdr[i].sh_info].sh_size) in __elfN() [all …]
|
H A D | load_elf.c | 562 chunk = shdr[ehdr->e_shstrndx].sh_size; in __elfN() 574 size = shdr[i].sh_size; in __elfN() 595 (shdr[i].sh_offset + shdr[i].sh_size <= in __elfN() 598 shdr[i].sh_size = 0; in __elfN() 602 if (shdr[i].sh_offset == 0 || shdr[i].sh_size == 0) in __elfN() 633 size = shdr[i].sh_size; in __elfN() 639 (uintmax_t)shdr[i].sh_size, (uintmax_t)shdr[i].sh_offset, in __elfN() 641 (uintmax_t)(lastaddr + shdr[i].sh_size)); in __elfN() 655 result = archsw.arch_readin(ef->fd, lastaddr, shdr[i].sh_size); in __elfN() 656 if (result < 0 || (size_t)result != shdr[i].sh_size) { in __elfN() [all …]
|
/illumos-gate/usr/src/cmd/file/ |
H A D | elf_read.c | 218 EI_Ehdr_shnum = EI_Shdr.sh_size; in elf_read() 436 if ((strtab = malloc(shdr->sh_size)) == NULL) in process_shdr() 439 if (pread64(EI->elffd, strtab, shdr->sh_size, shdr->sh_offset) in process_shdr() 440 != shdr->sh_size) in process_shdr() 443 strtab_sz = shdr->sh_size; in process_shdr() 467 if (shdr->sh_size == 0 || shdr->sh_entsize == 0) { in process_shdr() 472 capn = (shdr->sh_size / shdr->sh_entsize); in process_shdr() 518 if (shdr->sh_size == 0 || shdr->sh_entsize == 0) { in process_shdr() 524 dynn = (shdr->sh_size / shdr->sh_entsize); in process_shdr()
|
/illumos-gate/usr/src/uts/i86xpv/os/ |
H A D | xpv_panic.c | 857 namesize = shp->sh_size; in init_xen_module() 858 names = kmem_zalloc(shp->sh_size, KM_SLEEP); in init_xen_module() 859 if (kobj_read_file(file, names, shp->sh_size, shp->sh_offset) < 0) in init_xen_module() 882 if ((shp->sh_size != 0) && in init_xen_module() 900 mp->data_size += ALIGN(shp->sh_size, 8); in init_xen_module() 907 mp->text_size += ALIGN(shp->sh_size, 8); in init_xen_module() 934 mp->nsyms = mp->symhdr->sh_size / mp->symhdr->sh_entsize; in init_xen_module() 937 mp->symsize = mp->symhdr->sh_size + in init_xen_module() 938 mp->nsyms * sizeof (symid_t) + mp->strhdr->sh_size; in init_xen_module() 941 mp->strings = (char *)(mp->symtbl + mp->symhdr->sh_size); in init_xen_module() [all …]
|
/illumos-gate/usr/src/lib/libdtrace/common/ |
H A D | dt_link.c | 63 dt_write(dtp, fd, (data), elf_file.shdr[(index)].sh_size) != \ 64 elf_file.shdr[(index)].sh_size) 506 shp->sh_size = sizeof (DTRACE_SHSTRTAB32); in dump_elf32() 508 off = P2ROUNDUP(shp->sh_offset + shp->sh_size, 8); in dump_elf32() 515 shp->sh_size = dof->dofh_filesz; in dump_elf32() 517 off = shp->sh_offset + shp->sh_size; in dump_elf32() 524 shp->sh_size = de.de_strlen; in dump_elf32() 526 off = P2ROUNDUP(shp->sh_offset + shp->sh_size, 4); in dump_elf32() 536 shp->sh_size = de.de_nsym * sizeof (Elf32_Sym); in dump_elf32() 538 off = P2ROUNDUP(shp->sh_offset + shp->sh_size, 4); in dump_elf32() [all …]
|
/illumos-gate/usr/src/cmd/sgs/size/common/ |
H A D | process.c | 161 first += shdr.sh_size; in process() 166 second += shdr.sh_size; in process() 170 third += shdr.sh_size; in process() 175 size += shdr.sh_size; in process() 179 (void) printf(prusect[numbase], shdr.sh_size); in process()
|
/illumos-gate/usr/src/cmd/mdb/common/mdb/ |
H A D | mdb_gelf.c | 65 shstr->gs_data = mdb_zalloc(shstr->gs_shdr.sh_size + 1, UM_SLEEP); in gelf_sect_init() 67 if (IOP_READ(gf->gf_io, shstr->gs_data, shstr->gs_shdr.sh_size) != in gelf_sect_init() 68 shstr->gs_shdr.sh_size) { in gelf_sect_init() 70 mdb_free(shstr->gs_data, shstr->gs_shdr.sh_size); in gelf_sect_init() 78 if (shp->sh_name >= shstr->gs_shdr.sh_size) { in gelf_sect_init() 123 gpp->p_filesz = shp->sh_size; in gelf_sect_init() 124 gpp->p_memsz = shp->sh_size; in gelf_sect_init() 144 IOP_NAME(gf->gf_io), gsp->gs_name, (ulong_t)gsp->gs_shdr.sh_size); in mdb_gelf_sect_load() 146 gsp->gs_data = mdb_alloc(gsp->gs_shdr.sh_size, UM_SLEEP); in mdb_gelf_sect_load() 154 nbytes = IOP_READ(gf->gf_io, gsp->gs_data, gsp->gs_shdr.sh_size); in mdb_gelf_sect_load() [all …]
|
/illumos-gate/usr/src/uts/i86pc/dboot/ |
H A D | dboot_elfload.c | 192 (ulong_t)shdr->sh_size, in dboot_elfload64() 194 next_addr + shdr->sh_size); in dboot_elfload64() 196 shdr->sh_size); in dboot_elfload64()
|
/illumos-gate/usr/src/uts/common/krtld/ |
H A D | kobj.c | 758 mp->strhdr->sh_size = dyn->d_un.d_val; in load_exec() 822 mp->symhdr->sh_size = mp->nsyms * mp->symhdr->sh_entsize; in load_exec() 924 mp->nsyms = mp->symhdr->sh_size / mp->symhdr->sh_entsize; in load_linker() 931 mp->symsize = mp->symhdr->sh_size + mp->strhdr->sh_size + sizeof (int) + in load_linker() 1486 Sym *esp = (Sym *)(mp->symtbl + mp->symhdr->sh_size); in kobj_export_ksyms() 1562 mp->symhdr->sh_size = nsyms * symsize; in kobj_export_ksyms() 1570 mp->strhdr->sh_size = strsize; in kobj_export_ksyms() 1608 shp->sh_size); in kobj_export_ksyms() 1780 dyndata = kobj_alloc(dshp->sh_size, KM_WAIT|KM_TMP); in do_dynamic() 1781 if (kobj_read_file(file, dyndata, dshp->sh_size, dshp->sh_offset) < 0) { in do_dynamic() [all …]
|
/illumos-gate/usr/src/ucblib/libucb/port/gen/ |
H A D | nlist.c | 201 (size_t)symhdr->sh_size, in _elf_nlist() 202 (size_t)((symhdr->sh_size / symhdr->sh_entsize) * in _elf_nlist() 225 if ((strdata = elf_read(fd, strhdr->sh_offset, strhdr->sh_size, in _elf_nlist() 226 strhdr->sh_size, ELF_T_BYTE)) == 0) { in _elf_nlist() 237 ((char *)strdata->d_buf)[strhdr->sh_size-1] = '\0'; in _elf_nlist() 244 if (sym->st_name > strhdr->sh_size) { in _elf_nlist()
|
/illumos-gate/usr/src/uts/common/sharefs/ |
H A D | share.h | 46 size_t sh_size; member 57 size32_t sh_size; member
|
/illumos-gate/usr/src/cmd/sgs/elfedit/common/ |
H A D | util_machelf.c | 217 Word cnt = symsec->sec_shdr->sh_size / symsec->sec_shdr->sh_entsize; in elfedit_name_to_symndx() 382 *num = cache->sec_shdr->sh_size / in elfedit_sec_getcap() 421 *num = cache->sec_shdr->sh_size / cache->sec_shdr->sh_entsize; in elfedit_sec_getdyn() 462 *num = cache->sec_shdr->sh_size / in elfedit_sec_getsyminfo() 609 *num = symsec->sec_shdr->sh_size / symsec->sec_shdr->sh_entsize; in elfedit_sec_getsymtab() 675 *num = xshndxsec->sec_shdr->sh_size / xshndxsec->sec_shdr->sh_entsize; in elfedit_sec_getxshndx() 736 *num = versymsec->sec_shdr->sh_size / versymsec->sec_shdr->sh_entsize; in elfedit_sec_getversym() 818 len = sec->sec_shdr->sh_size - tail_ign; in elfedit_sec_findstr() 868 Word numdyn = dynsec->sec_shdr->sh_size / dynsec->sec_shdr->sh_entsize; in elfedit_dynstr_getpad() 945 ins_off = strsec->sec_shdr->sh_size - tail_ign; in elfedit_dynstr_insert()
|
/illumos-gate/usr/src/cmd/sgs/libld/common/ |
H A D | sections.c | 184 (isp->is_shdr->sh_size > 0))) && in isdesc_discarded() 653 shdr->sh_size = size; in new_section() 719 shdr->sh_size = size; in new_section_from_template() 766 shdr->sh_size = size; in ld_make_bss() 922 shdr->sh_size = (Xword)data->d_size; in make_comment() 1311 shdr->sh_size = (Xword)size; in make_dynamic() 1345 shdr->sh_size = (Xword)size; in ld_make_got() 1402 shdr->sh_size = (Xword)size; in make_interp() 1718 if ((data->d_buf = libld_malloc(shdr->sh_size)) == NULL) in make_cap() 1965 shdr->sh_size = (Xword)size; in make_plt() [all …]
|
/illumos-gate/usr/src/cmd/sgs/elfdump/common/ |
H A D | elfdump.c | 336 if ((shdr->sh_entsize == 0) || (shdr->sh_size == 0)) { in stringtbl() 356 *symnum = (shdr->sh_size / shdr->sh_entsize); in stringtbl() 411 if ((shdr->sh_entsize == 0) || (shdr->sh_size == 0)) { in symlookup() 420 symn = (Word)(shdr->sh_size / shdr->sh_entsize); in symlookup() 894 CHECK(MSG_INTL(MSG_STR_FILESIZE), p_filesz, sh_size); in check_phdr_v_shdr() 895 CHECK(MSG_INTL(MSG_STR_MEMSIZE), p_memsz, sh_size); in check_phdr_v_shdr() 1055 if ((shdr->sh_entsize == 0) || (shdr->sh_size == 0)) { in init_symtbl_state() 1065 state->symn = (Word)(shdr->sh_size / shdr->sh_entsize); in init_symtbl_state() 1112 symn = (uint_t)(shdr->sh_size / shdr->sh_entsize); in symbols_getxindex() 1329 if (((v + sym->st_size) > tshdr->sh_size)) { in output_symbol() [all …]
|
/illumos-gate/usr/src/uts/common/os/ |
H A D | ksyms_snapshot.c | 85 size_t nsyms = symhdr->sh_size / symsize; in ksyms_walk_one() 169 shp->sh_size = kw.kw_size[KW_LOCALS] + kw.kw_size[KW_GLOBALS]; in ksyms_snapshot() 180 shp->sh_size = kw.kw_size[KW_STRINGS]; in ksyms_snapshot() 187 shp->sh_size = sizeof (ksyms_shstrtab); in ksyms_snapshot()
|
/illumos-gate/usr/src/cmd/sgs/librtld/common/ |
H A D | syms.c | 55 symn = shdr->sh_size / shdr->sh_entsize; in update_sym() 91 num = (Word)(shdr->sh_size / shdr->sh_entsize); in syminfo()
|
/illumos-gate/usr/src/cmd/sgs/elfedit/modules/common/ |
H A D | shdr.c | 323 EC_XWORD(shdr->sh_size)); in print_shdr() 675 Xword sh_size; in cmd_body() local 677 sh_size = elfedit_atoui(argstate.argv[1], NULL); in cmd_body() 678 if (shdr->sh_size == sh_size) { in cmd_body() 683 EC_XWORD(shdr->sh_size)); in cmd_body() 689 EC_XWORD(shdr->sh_size), in cmd_body() 690 EC_XWORD(sh_size)); in cmd_body() 692 shdr->sh_size = sh_size; in cmd_body()
|
/illumos-gate/usr/src/uts/common/exec/elf/ |
H A D | elf.c | 1170 *nshdrs = shdr.sh_size; in getelfhead() 1270 if ((*shstrsizep = shdr->sh_size) == 0) { in getelfshdr() 1638 size_t n = src->sh_size; in elf_copy_scn() 1649 dst->sh_size = 0; in elf_copy_scn() 1664 dst->sh_size = 0; in elf_copy_scn() 1675 ctx->ecc_doffset += src->sh_size; in elf_copy_scn() 1773 elf_ctx_resize_scratch(ctx, shdr->sh_size); in elf_process_obj_scns() 1785 v[idx].sh_size = shdr->sh_size; in elf_process_obj_scns() 1838 elf_ctx_resize_scratch(ctx, ctf->sh_size); in elf_process_obj_scns() 1850 v[idx].sh_size = ctf->sh_size; in elf_process_obj_scns() [all …]
|