/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 | 576 for (cnt = 1; cnt < shnum; cnt++) { in unwind_eh_frame() 1041 state->shnum = shnum; in init_symtbl_state() 1412 if (cshdr->sh_link >= shnum) { in cap_section() 1466 if (cshdr->sh_info >= shnum) { in cap_section() 1641 if (cishdr->sh_info >= shnum) { in cap_section() 5157 &shnum, &flags) == 0) in regular() 5165 if (shnum <= 1) in regular() 5327 hash(cache, shnum, file, flags); in regular() 5330 got(cache, shnum, ehdr, file); in regular() 5339 reloc(cache, shnum, ehdr, file); in regular() [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 | 252 size_t shnum; in process_file() local 278 initialize(shnum, cmd_info, &state); in process_file() 329 size_t shstrndx, shnum; in traverse_file() local 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 798 if ((src_shdr.sh_link >= shnum) || in build_file() 1121 if ((shnum >= src_shdr.sh_link) || in build_file() 1128 if ((shnum >= src_shdr.sh_info) || in build_file() [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/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/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);
|