Lines Matching refs:nshdrs
194 uint_t nshdrs, shstrndx, nphdrs; in mapexec_brand() local
211 if ((error = getelfhead(vp, CRED(), ehdr, &nshdrs, &shstrndx, in mapexec_brand()
309 uint_t nshdrs, shstrndx, nphdrs; in elfexec() local
326 if ((error = getelfhead(vp, CRED(), ehdrp, &nshdrs, &shstrndx, in elfexec()
786 if ((error = getelfhead(nvp, CRED(), ehdrp, &nshdrs, in elfexec()
1112 getelfhead(vnode_t *vp, cred_t *credp, Ehdr *ehdr, uint_t *nshdrs, in getelfhead() argument
1147 *nshdrs = ehdr->e_shnum; in getelfhead()
1156 if ((*nshdrs == 0 && ehdr->e_shoff != 0) || in getelfhead()
1169 if (*nshdrs == 0) in getelfhead()
1170 *nshdrs = shdr.sh_size; in getelfhead()
1229 getelfshdr(vnode_t *vp, cred_t *credp, const Ehdr *ehdr, uint_t nshdrs, in getelfshdr() argument
1245 nshdrs == 0 || shstrndx >= nshdrs) { in getelfshdr()
1249 *shsizep = nshdrs * ehdr->e_shentsize; in getelfshdr()
1307 uint_t nshdrs, shstrndx; in elfreadhdr() local
1309 if ((error = getelfhead(vp, credp, ehdrp, &nshdrs, &shstrndx, in elfreadhdr()
1692 uint_t nshdrs, shstrndx, nphdrs, count, extra; in elf_process_obj_scns() local
1714 if (getelfhead(mvp, credp, &ehdr, &nshdrs, &shstrndx, &nphdrs) != 0 || in elf_process_obj_scns()
1715 getelfshdr(mvp, credp, &ehdr, nshdrs, shstrndx, &shbase, &shsize, in elf_process_obj_scns()
1722 for (uint_t i = 1; i < nshdrs; i++, off += ehdr.e_shentsize) { in elf_process_obj_scns()
1735 if (ctf->sh_link != 0 && ctf->sh_link < nshdrs) { in elf_process_obj_scns()
1801 symchk->sh_link == 0 || symchk->sh_link >= nshdrs) { in elf_process_obj_scns()
2080 uint_t i, nphdrs, nshdrs; in elfcore() local
2117 nshdrs = error = 0; in elfcore()
2119 error = elf_process_scns(&ctx, NULL, 0, &nshdrs); in elfcore()
2130 if (nshdrs == 0 && nphdrs >= PN_XNUM) in elfcore()
2131 nshdrs = 1; in elfcore()
2141 shdrsz = nshdrs * sizeof (Shdr); in elfcore()
2200 if (nshdrs > 0) { in elfcore()
2201 if (nshdrs >= SHN_LORESERVE) { in elfcore()
2203 shdr0.sh_size = nshdrs; in elfcore()
2205 ehdr->e_shnum = (unsigned short)nshdrs; in elfcore()
2208 if (nshdrs - 1 >= SHN_LORESERVE) { in elfcore()
2210 shdr0.sh_link = nshdrs - 1; in elfcore()
2212 ehdr->e_shstrndx = (unsigned short)(nshdrs - 1); in elfcore()
2529 if (nshdrs > 0) { in elfcore()
2533 if (nshdrs > 1) { in elfcore()
2536 error = elf_process_scns(&ctx, shdr, nshdrs, NULL); in elfcore()