Home
last modified time | relevance | path

Searched refs:shnum (Results 1 – 17 of 17) sorted by relevance

/titanic_50/usr/src/cmd/sgs/libelf/common/
H A Dgetshnum.c51 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 Dchecksum.c108 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()
/titanic_50/usr/src/cmd/sgs/elfdump/common/
H A Delfdump.c124 Word shnum; /* # of sections in cache */ member
310 stringtbl(Cache *cache, int symtab, Word ndx, Word shnum, const char *file, in stringtbl() argument
319 if ((shdr->sh_link == 0) || (shdr->sh_link >= shnum)) { in stringtbl()
358 if ((shdr->sh_link == 0) || (shdr->sh_link >= shnum)) { in stringtbl()
390 symlookup(const char *name, Cache *cache, Word shnum, Sym **sym, in symlookup() argument
420 if ((shdr->sh_link == 0) || (shdr->sh_link >= shnum)) { in symlookup()
458 sections(const char *file, Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi) in sections() argument
462 for (seccnt = 1; seccnt < shnum; seccnt++) { in sections()
540 unwind_eh_frame(Cache *cache, Word shndx, Word shnum, Phdr *uphdr, Ehdr *ehdr, in unwind_eh_frame() argument
562 for (cnt = 1; cnt < shnum; cnt++) { in unwind_eh_frame()
[all …]
H A Dfake_shdr.c1068 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()
/titanic_50/usr/src/cmd/sgs/mcs/common/
H A Dfile.c60 static void initialize(int shnum, Cmd_Info *, file_state_t *);
249 size_t shnum; in process_file() local
260 if (elf_getshdrnum(elf, &shnum) == -1) { in process_file()
275 initialize(shnum, cmd_info, &state); in process_file()
326 size_t shstrndx, shnum; in traverse_file() local
330 if (elf_getshdrnum(elf, &shnum) == -1) { in traverse_file()
517 if ((tmp_shdr.sh_link < shnum) && in traverse_file()
585 for (i = 1; i < shnum; i++) { in traverse_file()
636 for (i = 1; i < shnum; i++) { in traverse_file()
692 size_t shnum, shstrndx; in build_file() local
[all …]
/titanic_50/usr/src/lib/libctf/common/
H A Dctf_lib.c421 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 …]
/titanic_50/usr/src/cmd/sgs/size/common/
H A Dprocess.c93 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()
/titanic_50/usr/src/cmd/sgs/libelf/demo/
H A Ddcom.c92 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()
/titanic_50/usr/src/cmd/sgs/libld/common/
H A Dorder.c172 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()
/titanic_50/usr/src/cmd/dis/
H A Ddis_target.c449 size_t shnum = 0; in dis_tgt_create() local
505 if (elf_getshdrnum(elf, &shnum) == -1) { in dis_tgt_create()
513 shnum); in dis_tgt_create()
514 current->dt_shncount = shnum; in dis_tgt_create()
/titanic_50/usr/src/cmd/sgs/elfedit/common/
H A Dutil.c412 elfedit_atoshndx(const char *str, size_t shnum) in elfedit_atoshndx() argument
417 if ((ndx >= shnum) && ((ndx < SHN_LORESERVE) || (ndx > SHN_HIRESERVE))) in elfedit_atoshndx()
419 EC_WORD(ndx), EC_WORD(shnum-1)); in elfedit_atoshndx()
H A Dutil_machelf.c123 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()
/titanic_50/usr/src/cmd/sgs/dump/common/
H A Ddump.c772 size_t shnum; in dump_reloc_table() local
791 if (elf_getshdrnum(elf_file, &shnum) == -1) { in dump_reloc_table()
800 (p_scns->p_shdr.sh_link >= (GElf_Word)shnum)) { in dump_reloc_table()
1661 size_t shnum; in dump_section_table() local
1664 if (elf_getshdrnum(elf_file, &shnum) == -1) { in dump_section_table()
1677 if ((buffer = calloc(shnum, sizeof (SCNTAB))) == NULL) { in dump_section_table()
1683 num_scns = (int)shnum - 1; in dump_section_table()
/titanic_50/usr/src/cmd/sgs/pvs/common/
H A Dpvs.c1093 size_t shnum = 0; in main() local
1158 if (elf_getshdrnum(elf, &shnum) == -1) { in main()
1164 if ((cache = calloc(shnum, sizeof (Cache))) == NULL) { in main()
/titanic_50/usr/src/cmd/sgs/elfedit/modules/common/
H A Dehdr.c1065 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()
/titanic_50/usr/src/cmd/sgs/ar/common/
H A Dfile.c208 size_t shnum; in recover_padding() local
226 if (elf_getshdrnum(elf, &shnum) == -1) in recover_padding()
230 ? (ehdr.e_shoff + (shnum * ehdr.e_shentsize)) : 0; in recover_padding()
/titanic_50/usr/src/cmd/sgs/include/
H A Delfedit.h803 extern elfedit_atoui_t elfedit_atoshndx(const char *str, size_t shnum);