Lines Matching refs:shnum
120 Word shnum; /* # of sections in cache */ member
306 stringtbl(Cache *cache, int symtab, Word ndx, Word shnum, const char *file, in stringtbl() argument
315 if ((shdr->sh_link == 0) || (shdr->sh_link >= shnum)) { in stringtbl()
354 if ((shdr->sh_link == 0) || (shdr->sh_link >= shnum)) { in stringtbl()
386 symlookup(const char *name, Cache *cache, Word shnum, Sym **sym, in symlookup() argument
416 if ((shdr->sh_link == 0) || (shdr->sh_link >= shnum)) { in symlookup()
454 sections(const char *file, Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi) in sections() argument
458 for (seccnt = 1; seccnt < shnum; seccnt++) { in sections()
536 unwind_eh_frame(Cache *cache, Word shndx, Word shnum, Phdr *uphdr, Ehdr *ehdr, in unwind_eh_frame() argument
558 for (cnt = 1; cnt < shnum; cnt++) { in unwind_eh_frame()
855 unwind(Cache *cache, Word shnum, Word phnum, Ehdr *ehdr, uchar_t osabi, in unwind() argument
897 for (cnt = 1; cnt < shnum; cnt++) { in unwind()
947 unwind_eh_frame(cache, cnt, shnum, uphdr, ehdr, in unwind()
966 init_symtbl_state(SYMTBL_STATE *state, Cache *cache, Word shnum, Word secndx, in init_symtbl_state() argument
976 state->shnum = shnum; in init_symtbl_state()
1005 if ((shdr->sh_link == 0) || (shdr->sh_link >= shnum)) { in init_symtbl_state()
1035 for (symcnt = 1; symcnt < state->shnum; symcnt++) { in symbols_getxindex()
1143 (sym->st_shndx < state->shnum)) { in output_symbol()
1157 state->shxndx.data[symndx]) > state->shnum) { in output_symbol()
1173 (sym->st_shndx >= state->shnum)) { in output_symbol()
1309 cap_section(const char *file, Cache *cache, Word shnum, Cache *ccache, in cap_section() argument
1343 if (cshdr->sh_link >= shnum) { in cap_section()
1365 if ((cishdr->sh_link == 0) || (cishdr->sh_link >= shnum)) { in cap_section()
1380 if (!init_symtbl_state(&state, cache, shnum, in cap_section()
1397 if (cshdr->sh_info >= shnum) { in cap_section()
1572 if (cishdr->sh_info >= shnum) { in cap_section()
1684 cap(const char *file, Cache *cache, Word shnum, Word phnum, Ehdr *ehdr, in cap() argument
1716 for (cnt = 1; cnt < shnum; cnt++) { in cap()
1724 if (cap_section(file, cache, shnum, _cache, osabi, in cap()
1767 interp(const char *file, Cache *cache, Word shnum, Word phnum, Elf *elf) in interp() argument
1798 for (cnt = 1; cnt < shnum; cnt++) { in interp()
1844 syminfo(Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi, const char *file) in syminfo() argument
1854 for (cnt = 1; cnt < shnum; cnt++) { in syminfo()
1896 } else if ((infoshdr->sh_info >= shnum) || in syminfo()
1929 if (stringtbl(cache, 1, cnt, shnum, file, in syminfo()
2279 versions(Cache *cache, Word shnum, const char *file, uint_t flags, in versions() argument
2288 for (cnt = 1; cnt < shnum; cnt++) { in versions()
2351 if ((shdr->sh_link == 0) || (shdr->sh_link >= shnum)) { in versions()
2417 symbols(Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi, in symbols() argument
2424 for (secndx = 1; secndx < shnum; secndx++) { in symbols()
2439 if (!init_symtbl_state(&state, cache, shnum, secndx, ehdr, in symbols()
2460 sunw_sort(Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi, in sunw_sort() argument
2473 for (sortsecndx = 1; sortsecndx < shnum; sortsecndx++) { in sunw_sort()
2492 if ((sortshdr->sh_link == 0) || (sortshdr->sh_link >= shnum)) { in sunw_sort()
2504 if (!init_symtbl_state(&ldynsym_state, cache, shnum, in sunw_sort()
2515 for (symsecndx = 1; symsecndx < shnum; symsecndx++) { in sunw_sort()
2521 if (symsecndx >= shnum) { /* Dynsym not found! */ in sunw_sort()
2530 if (!init_symtbl_state(&dynsym_state, cache, shnum, in sunw_sort()
2597 reloc(Cache *cache, Word shnum, Ehdr *ehdr, const char *file) in reloc() argument
2601 for (cnt = 1; cnt < shnum; cnt++) { in reloc()
2647 if (stringtbl(cache, 1, cnt, shnum, file, in reloc()
2866 Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi, const char *file) in dyn_symtest() argument
2887 symlookup(symname, cache, shnum, &sym, target_cache, in dyn_symtest()
2900 dynamic(Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi, const char *file) in dynamic() argument
2938 for (cnt = 1; cnt < shnum; cnt++) { in dynamic()
2947 (void) stringtbl(cache, 0, cnt, shnum, file, in dynamic()
3039 for (cnt = dynsec_ndx; (cnt < shnum) && (dynsec_cnt < dynsec_num); in dynamic()
3055 if (stringtbl(cache, 0, cnt, shnum, file, 0, 0, &strsec) == 0) in dynamic()
3224 sec.fini, cache, shnum, ehdr, osabi, file); in dynamic()
3243 sec.init, cache, shnum, ehdr, osabi, file); in dynamic()
3415 move(Cache *cache, Word shnum, const char *file, uint_t flags) in move() argument
3420 for (cnt = 1; cnt < shnum; cnt++) { in move()
3451 if (stringtbl(cache, 1, cnt, shnum, file, in move()
3506 (((shndx >= 1) && (shndx <= shnum)) && in move()
3792 note(Cache *cache, Word shnum, Ehdr *ehdr, const char *file) in note() argument
3799 for (cnt = 1; cnt < shnum; cnt++) { in note()
3847 has_linux_abi_note(Cache *cache, Word shnum, const char *file) in has_linux_abi_note() argument
3851 for (cnt = 1; cnt < shnum; cnt++) { in has_linux_abi_note()
3953 hash(Cache *cache, Word shnum, const char *file, uint_t flags) in hash() argument
3960 for (cnt = 1; cnt < shnum; cnt++) { in hash()
3990 if ((hshdr->sh_link == 0) || (hshdr->sh_link >= shnum)) { in hash()
4015 if ((sshdr->sh_link == 0) || (sshdr->sh_link >= shnum)) { in hash()
4093 group(Cache *cache, Word shnum, const char *file, uint_t flags) in group() argument
4097 for (scnt = 1; scnt < shnum; scnt++) { in group()
4119 if (stringtbl(cache, 1, scnt, shnum, file, in group()
4180 if (grpdata[gcnt] >= shnum) in group()
4192 got(Cache *cache, Word shnum, Ehdr *ehdr, const char *file) in got() argument
4208 for (cnt = 1; cnt < shnum; cnt++) { in got()
4264 for (cnt = 1; cnt < shnum; cnt++) { in got()
4316 if (stringtbl(cache, 1, cnt, shnum, file, in got()
4378 if (symlookup(MSG_ORIG(MSG_SYM_GOT), cache, shnum, &gotsym, NULL, in got()
4460 size_t shnum, Cache **cache_ret, Word flags) in shdr_cache() argument
4503 if ((*cache_ret = cache = malloc(shnum * sizeof (Cache))) == NULL) { in shdr_cache()
4528 if ((shdr_ndx_arr = malloc(shnum * sizeof (*shdr_ndx_arr))) == NULL) { in shdr_cache()
4735 for (ndx = 1; ndx < shnum; ndx++) { in shdr_cache()
4775 size_t shstrndx, size_t *shnum, uint_t *flags) in create_cache() argument
4783 if ((*shnum <= 1) && ((*flags & FLG_CTL_FAKESHDR) == 0)) { in create_cache()
4789 if (fake_shdr_cache(file, fd, elf, ehdr, cache, shnum) == 0) in create_cache()
4792 if (shdr_cache(file, elf, ehdr, shstrndx, *shnum, in create_cache()
4807 size_t ndx, shstrndx, shnum, phnum; in regular() local
4819 if (elf_getshdrnum(elf, &shnum) == -1) { in regular()
4922 shstrndx, &shnum, &flags) == 0) { in regular()
4926 if (has_linux_abi_note(cache, shnum, file)) { in regular()
4987 &shnum, &flags) == 0) in regular()
4995 if (shnum <= 1) in regular()
5002 for (ndx = 1; ndx < shnum; ndx++) { in regular()
5038 for (ndx = 1; ndx < shnum; ndx++) { in regular()
5142 sections(file, cache, shnum, ehdr, osabi); in regular()
5145 interp(file, cache, shnum, phnum, elf); in regular()
5148 versions(cache, shnum, file, flags, &versym); in regular()
5151 symbols(cache, shnum, ehdr, osabi, &versym, file, flags); in regular()
5154 sunw_sort(cache, shnum, ehdr, osabi, &versym, file, flags); in regular()
5157 hash(cache, shnum, file, flags); in regular()
5160 got(cache, shnum, ehdr, file); in regular()
5163 group(cache, shnum, file, flags); in regular()
5166 syminfo(cache, shnum, ehdr, osabi, file); in regular()
5169 reloc(cache, shnum, ehdr, file); in regular()
5172 dynamic(cache, shnum, ehdr, osabi, file); in regular()
5179 note_cnt = note(cache, shnum, ehdr, file); in regular()
5207 move(cache, shnum, file, flags); in regular()
5213 cap(file, cache, shnum, phnum, ehdr, osabi, elf, flags); in regular()
5217 unwind(cache, shnum, phnum, ehdr, osabi, file, elf, flags); in regular()
5223 fake_shdr_cache_free(cache, shnum); in regular()