Lines Matching defs:shnum

124 	Word		shnum;		/* # of sections in cache */
310 stringtbl(Cache *cache, int symtab, Word ndx, Word shnum, const char *file,
324 if ((shdr->sh_link == 0) || (shdr->sh_link >= shnum)) {
364 if ((shdr->sh_link == 0) || (shdr->sh_link >= shnum)) {
382 * shnum - # of sections in cache
396 symlookup(const char *name, Cache *cache, Word shnum, Sym **sym,
426 if ((shdr->sh_link == 0) || (shdr->sh_link >= shnum)) {
464 sections(const char *file, Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi)
468 for (seccnt = 1; seccnt < shnum; seccnt++) {
534 * shnum - Total number of sections which exist
546 unwind_eh_frame(Cache *cache, Word shndx, Word shnum, Phdr *uphdr, Ehdr *ehdr,
568 for (cnt = 1; cnt < shnum; cnt++) {
865 unwind(Cache *cache, Word shnum, Word phnum, Ehdr *ehdr, uchar_t osabi,
907 for (cnt = 1; cnt < shnum; cnt++) {
957 unwind_eh_frame(cache, cnt, shnum, uphdr, ehdr,
968 * shnum - # of sections in cache
976 init_symtbl_state(SYMTBL_STATE *state, Cache *cache, Word shnum, Word secndx,
986 state->shnum = shnum;
1016 if ((shdr->sh_link == 0) || (shdr->sh_link >= shnum)) {
1046 for (symcnt = 1; symcnt < state->shnum; symcnt++) {
1154 (sym->st_shndx < state->shnum)) {
1168 state->shxndx.data[symndx]) > state->shnum) {
1184 (sym->st_shndx >= state->shnum)) {
1320 cap_section(const char *file, Cache *cache, Word shnum, Cache *ccache,
1354 if (cshdr->sh_link >= shnum) {
1376 if ((cishdr->sh_link == 0) || (cishdr->sh_link >= shnum)) {
1391 if (!init_symtbl_state(&state, cache, shnum,
1408 if (cshdr->sh_info >= shnum) {
1583 if (cishdr->sh_info >= shnum) {
1695 cap(const char *file, Cache *cache, Word shnum, Word phnum, Ehdr *ehdr,
1727 for (cnt = 1; cnt < shnum; cnt++) {
1735 if (cap_section(file, cache, shnum, _cache, osabi,
1778 interp(const char *file, Cache *cache, Word shnum, Word phnum, Elf *elf)
1809 for (cnt = 1; cnt < shnum; cnt++) {
1859 syminfo(Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi, const char *file)
1869 for (cnt = 1; cnt < shnum; cnt++) {
1911 } else if ((infoshdr->sh_info >= shnum) ||
1951 if (stringtbl(cache, 1, cnt, shnum, file,
2295 * shnum - # of sections in cache
2301 versions(Cache *cache, Word shnum, const char *file, uint_t flags,
2310 for (cnt = 1; cnt < shnum; cnt++) {
2375 if ((shdr->sh_link == 0) || (shdr->sh_link >= shnum)) {
2441 symbols(Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi,
2448 for (secndx = 1; secndx < shnum; secndx++) {
2463 if (!init_symtbl_state(&state, cache, shnum, secndx, ehdr,
2484 sunw_sort(Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi,
2497 for (sortsecndx = 1; sortsecndx < shnum; sortsecndx++) {
2516 if ((sortshdr->sh_link == 0) || (sortshdr->sh_link >= shnum)) {
2528 if (!init_symtbl_state(&ldynsym_state, cache, shnum,
2539 for (symsecndx = 1; symsecndx < shnum; symsecndx++) {
2545 if (symsecndx >= shnum) { /* Dynsym not found! */
2554 if (!init_symtbl_state(&dynsym_state, cache, shnum,
2621 reloc(Cache *cache, Word shnum, Ehdr *ehdr, const char *file)
2625 for (cnt = 1; cnt < shnum; cnt++) {
2671 if (stringtbl(cache, 1, cnt, shnum, file,
2882 * shnum - # of sections in cache
2890 Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi, const char *file)
2911 symlookup(symname, cache, shnum, &sym, target_cache,
2924 dynamic(Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi, const char *file)
2962 for (cnt = 1; cnt < shnum; cnt++) {
2971 (void) stringtbl(cache, 0, cnt, shnum, file,
3063 for (cnt = dynsec_ndx; (cnt < shnum) && (dynsec_cnt < dynsec_num);
3079 if (stringtbl(cache, 0, cnt, shnum, file, 0, 0, &strsec) == 0)
3248 sec.fini, cache, shnum, ehdr, osabi, file);
3267 sec.init, cache, shnum, ehdr, osabi, file);
3439 move(Cache *cache, Word shnum, const char *file, uint_t flags)
3444 for (cnt = 1; cnt < shnum; cnt++) {
3475 if (stringtbl(cache, 1, cnt, shnum, file,
3530 (((shndx >= 1) && (shndx <= shnum)) &&
3816 note(Cache *cache, Word shnum, Ehdr *ehdr, const char *file)
3823 for (cnt = 1; cnt < shnum; cnt++) {
3871 has_linux_abi_note(Cache *cache, Word shnum, const char *file)
3875 for (cnt = 1; cnt < shnum; cnt++) {
3979 hash(Cache *cache, Word shnum, const char *file, uint_t flags)
3986 for (cnt = 1; cnt < shnum; cnt++) {
4031 if ((hshdr->sh_link == 0) || (hshdr->sh_link >= shnum)) {
4072 if ((sshdr->sh_link == 0) || (sshdr->sh_link >= shnum)) {
4171 group(Cache *cache, Word shnum, const char *file, uint_t flags)
4175 for (scnt = 1; scnt < shnum; scnt++) {
4197 if (stringtbl(cache, 1, scnt, shnum, file,
4258 if (grpdata[gcnt] >= shnum)
4270 got(Cache *cache, Word shnum, Ehdr *ehdr, const char *file)
4286 for (cnt = 1; cnt < shnum; cnt++) {
4342 for (cnt = 1; cnt < shnum; cnt++) {
4394 if (stringtbl(cache, 1, cnt, shnum, file,
4463 if (symlookup(MSG_ORIG(MSG_SYM_GOT), cache, shnum, &gotsym, NULL,
4545 size_t shnum, Cache **cache_ret, Word flags)
4588 if ((*cache_ret = cache = malloc(shnum * sizeof (Cache))) == NULL) {
4606 * Note that shnum is an upper bound on the size required. It
4613 if ((shdr_ndx_arr = malloc(shnum * sizeof (*shdr_ndx_arr))) == NULL) {
4820 for (ndx = 1; ndx < shnum; ndx++) {
4861 size_t shstrndx, size_t *shnum, uint_t *flags)
4869 if ((*shnum <= 1) && ((*flags & FLG_CTL_FAKESHDR) == 0)) {
4875 if (fake_shdr_cache(file, fd, elf, ehdr, cache, shnum) == 0)
4878 if (shdr_cache(file, elf, ehdr, shstrndx, *shnum,
4893 size_t ndx, shstrndx, shnum, phnum;
4905 if (elf_getshdrnum(elf, &shnum) == -1) {
5008 shstrndx, &shnum, &flags) == 0) {
5012 if (has_linux_abi_note(cache, shnum, file)) {
5073 &shnum, &flags) == 0)
5081 if (shnum <= 1)
5088 for (ndx = 1; ndx < shnum; ndx++) {
5124 for (ndx = 1; ndx < shnum; ndx++) {
5228 sections(file, cache, shnum, ehdr, osabi);
5231 interp(file, cache, shnum, phnum, elf);
5234 versions(cache, shnum, file, flags, &versym);
5237 symbols(cache, shnum, ehdr, osabi, &versym, file, flags);
5240 sunw_sort(cache, shnum, ehdr, osabi, &versym, file, flags);
5243 hash(cache, shnum, file, flags);
5246 got(cache, shnum, ehdr, file);
5249 group(cache, shnum, file, flags);
5252 syminfo(cache, shnum, ehdr, osabi, file);
5255 reloc(cache, shnum, ehdr, file);
5258 dynamic(cache, shnum, ehdr, osabi, file);
5265 note_cnt = note(cache, shnum, ehdr, file);
5293 move(cache, shnum, file, flags);
5299 cap(file, cache, shnum, phnum, ehdr, osabi, elf, flags);
5303 unwind(cache, shnum, phnum, ehdr, osabi, file, elf, flags);
5309 fake_shdr_cache_free(cache, shnum);