| /illumos-gate/usr/src/cmd/sgs/libelf/common/ |
| H A D | getshnum.c | 51 elf_getshdrnum(Elf *elf, size_t *shnum) in elf_getshdrnum() argument 60 *shnum = ehdr.e_shnum; in elf_getshdrnum() 64 *shnum = 0; in elf_getshdrnum() 71 *shnum = shdr0.sh_size; in elf_getshdrnum() 76 elf_getshnum(Elf *elf, size_t *shnum) in elf_getshnum() argument 78 return (elf_getshdrnum(elf, shnum) == 0); in elf_getshnum()
|
| H A D | checksum.c | 108 size_t shnum; in elf_checksum() local 132 for (shnum = 1; shnum < ehdr->e_shnum; shnum++) { in elf_checksum() 133 if ((scn = elf_getscn(elf, shnum)) == 0) in elf_checksum()
|
| /illumos-gate/usr/src/cmd/sgs/elfdump/common/ |
| H A D | elfdump.c | 124 Word shnum; /* # of sections in cache */ member 310 stringtbl(Cache *cache, int symtab, Word ndx, Word shnum, const char *file, in stringtbl() argument 324 if ((shdr->sh_link == 0) || (shdr->sh_link >= shnum)) { in stringtbl() 364 if ((shdr->sh_link == 0) || (shdr->sh_link >= shnum)) { in stringtbl() 396 symlookup(const char *name, Cache *cache, Word shnum, Sym **sym, in symlookup() argument 426 if ((shdr->sh_link == 0) || (shdr->sh_link >= shnum)) { in symlookup() 464 sections(const char *file, Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi) in sections() argument 468 for (seccnt = 1; seccnt < shnum; seccnt++) { in sections() 554 unwind_eh_frame(Cache *cache, Word shndx, Word shnum, Phdr *uphdr, Ehdr *ehdr, in unwind_eh_frame() argument 576 for (cnt = 1; cnt < shnum; cnt++) { in unwind_eh_frame() [all …]
|
| H A D | fake_shdr.c | 1068 Cache **cache, size_t *shnum) in fake_shdr_cache() argument 1495 *shnum = num_sinfo + num_list_sinfo + 1; /* Extra for 1st NULL sec. */ in fake_shdr_cache() 1496 if ((*cache = _cache = malloc((*shnum) * sizeof (Cache))) == NULL) { in fake_shdr_cache() 1544 fake_shdr_cache_free(Cache *cache, size_t shnum) in fake_shdr_cache_free() argument 1548 for (_cache = cache; shnum--; _cache++) { in fake_shdr_cache_free()
|
| /illumos-gate/usr/src/cmd/sgs/mcs/common/ |
| H A D | file.c | 63 static void initialize(int shnum, Cmd_Info *, file_state_t *); 252 size_t shnum; in process_file() local 263 if (elf_getshdrnum(elf, &shnum) == -1) { in process_file() 278 initialize(shnum, cmd_info, &state); in process_file() 329 size_t shstrndx, shnum; in traverse_file() local 333 if (elf_getshdrnum(elf, &shnum) == -1) { in traverse_file() 520 if ((tmp_shdr.sh_link < shnum) && in traverse_file() 588 for (i = 1; i < shnum; i++) { in traverse_file() 642 for (i = 1; i < shnum; i++) { in traverse_file() 700 size_t shnum, shstrndx; in build_file() local [all …]
|
| /illumos-gate/usr/src/lib/libctf/common/ |
| H A D | ctf_lib.c | 421 size_t shstrndx, shnum; in ctf_fdcreate_int() local 506 shnum = hdr.e64.e_shnum; in ctf_fdcreate_int() 510 if ((shstrndx == SHN_XINDEX) || (shnum == 0)) { in ctf_fdcreate_int() 519 shnum = x32.sh_size; in ctf_fdcreate_int() 529 shnum = x64.sh_size; in ctf_fdcreate_int() 534 if (shstrndx >= shnum) in ctf_fdcreate_int() 537 nbytes = sizeof (GElf_Shdr) * shnum; in ctf_fdcreate_int() 549 nbytes = sizeof (Elf32_Shdr) * shnum; in ctf_fdcreate_int() 557 for (i = 0; i < shnum; i++) in ctf_fdcreate_int() 589 for (i = 0; i < shnum; i++) { in ctf_fdcreate_int() [all …]
|
| /illumos-gate/usr/src/cmd/sgs/size/common/ |
| H A D | process.c | 93 size_t ndx = 0, shnum = 0; in process() local 134 if (elf_getshdrnum(elf, &shnum) == -1) in process() 137 if (shnum == 0) in process() 140 numsect = shnum; in process()
|
| /illumos-gate/usr/src/cmd/sgs/libelf/demo/ |
| H A D | dcom.c | 92 size_t shstrndx, shnum, phnum; in delete_comment() local 102 if (elf_getshdrnum(elf, &shnum) == -1) { in delete_comment() 124 shndx = calloc(shnum, sizeof (int)); in delete_comment()
|
| /illumos-gate/usr/src/cmd/sgs/libld/common/ |
| H A D | order.c | 172 Word shnum = ifl->ifl_shnum; in validate_shf_ordered_dest() local 189 if ((isp2_ndx == 0) || (isp2_ndx >= shnum)) { in validate_shf_ordered_dest() 233 if (++iter >= shnum) { in validate_shf_ordered_dest()
|
| /illumos-gate/usr/src/uts/sparc/krtld/ |
| H A D | kobj_reloc.c | 141 for (i = 0; i < mp->shnum; i++, shp++) { in do_relocate() 292 for (shn = 1; shn < mp->shnum; shn++) { in do_relocations() 307 if (rshp->sh_info >= mp->shnum) { in do_relocations()
|
| H A D | kobj_isa.c | 109 for (shn = 1; shn < mp->shnum; shn++) { in get_progbits_size()
|
| /illumos-gate/usr/src/uts/common/krtld/ |
| H A D | kobj.c | 931 mp->shnum = mp->hdr.e_shnum; in load_linker() 934 shsize = mp->hdr.e_shentsize * mp->shnum; in load_linker() 938 for (i = 1; i < (int)mp->shnum; i++) { in load_linker() 1161 mp->shnum = mp->hdr.e_shnum; in kobj_load_elfhdr() 1182 if (mp->shnum == 0) in kobj_load_elfhdr() 1183 mp->shnum = hdr0.sh_size; in kobj_load_elfhdr() 1298 n = mp->hdr.e_shentsize * mp->shnum; in bind_primary() 1628 mp->shnum = 2; in kobj_export_ksyms() 1672 for (shn = 1; shn < omp->shnum; shn++) { in kobj_export_ksyms() 1684 kobj_free(omp->shdrs, omp->hdr.e_shentsize * omp->shnum); in kobj_export_ksyms() [all …]
|
| /illumos-gate/usr/src/uts/intel/amd64/krtld/ |
| H A D | kobj_reloc.c | 301 for (shn = 1; shn < mp->shnum; shn++) { in do_relocations() 316 if (rshp->sh_info >= mp->shnum) { in do_relocations()
|
| H A D | kobj_isa.c | 97 for (shn = 1; shn < mp->shnum; shn++) { in get_progbits_size()
|
| /illumos-gate/usr/src/cmd/dis/ |
| H A D | dis_target.c | 464 size_t shnum = 0; in dis_tgt_create() local 520 if (elf_getshdrnum(elf, &shnum) == -1) { in dis_tgt_create() 528 shnum); in dis_tgt_create() 529 current->dt_shncount = shnum; in dis_tgt_create()
|
| /illumos-gate/usr/src/cmd/sgs/elfedit/common/ |
| H A D | util_machelf.c | 123 Word shnum = obj_state->os_shnum; in elfedit_name_to_shndx() local 125 for (ndx = 0; ndx < shnum; ndx++, sec++) { in elfedit_name_to_shndx() 159 Word shnum = obj_state->os_shnum; in elfedit_type_to_shndx() local 161 for (ndx = 0; ndx < shnum; ndx++, sec++) { in elfedit_type_to_shndx()
|
| H A D | util.c | 411 elfedit_atoshndx(const char *str, size_t shnum) in elfedit_atoshndx() argument 416 if ((ndx >= shnum) && ((ndx < SHN_LORESERVE) || (ndx > SHN_HIRESERVE))) in elfedit_atoshndx() 418 EC_WORD(ndx), EC_WORD(shnum-1)); in elfedit_atoshndx()
|
| /illumos-gate/usr/src/cmd/sgs/dump/common/ |
| H A D | dump.c | 777 size_t shnum; in dump_reloc_table() local 796 if (elf_getshdrnum(elf_file, &shnum) == -1) { in dump_reloc_table() 805 (p_scns->p_shdr.sh_link >= (GElf_Word)shnum)) { in dump_reloc_table() 1662 size_t shnum; in dump_section_table() local 1665 if (elf_getshdrnum(elf_file, &shnum) == -1) { in dump_section_table() 1678 if ((buffer = calloc(shnum, sizeof (SCNTAB))) == NULL) { in dump_section_table() 1684 num_scns = (int)shnum - 1; in dump_section_table()
|
| /illumos-gate/usr/src/uts/common/sys/ |
| H A D | kobj.h | 69 Elf64_Word shnum; member
|
| /illumos-gate/usr/src/cmd/sgs/pvs/common/ |
| H A D | pvs.c | 1089 size_t shnum = 0; in main() local 1154 if (elf_getshdrnum(elf, &shnum) == -1) { in main() 1160 if ((cache = calloc(shnum, sizeof (Cache))) == NULL) { in main()
|
| /illumos-gate/usr/src/cmd/sgs/elfedit/modules/common/ |
| H A D | ehdr.c | 1065 Word shnum = (Word) elfedit_atoui(argstate.argv[0], in cmd_body() local 1073 if (shnum >= SHN_LORESERVE) { in cmd_body() 1075 sh_size = shnum; in cmd_body() 1077 e_shnum = shnum; in cmd_body()
|
| /illumos-gate/usr/src/cmd/sgs/ar/common/ |
| H A D | file.c | 209 size_t shnum; in recover_padding() local 227 if (elf_getshdrnum(elf, &shnum) == -1) in recover_padding() 231 ? (ehdr.e_shoff + (shnum * ehdr.e_shentsize)) : 0; in recover_padding()
|
| /illumos-gate/usr/src/cmd/sgs/include/ |
| H A D | elfedit.h | 806 extern elfedit_atoui_t elfedit_atoshndx(const char *str, size_t shnum);
|
| /illumos-gate/usr/src/cmd/mdb/common/mdb/ |
| H A D | mdb_kvm.c | 142 bcopy(&kmod->shnum, &kmod->shdrs, in kt_adjust_module() 152 kmod->shnum = kmod->hdr.e_shnum; in kt_adjust_module()
|