Lines Matching defs:cache
107 Cache *cache; /* Pointer to cache entry for VERSYM */
122 Cache *cache; /* Cache of all section headers */
124 Word shnum; /* # of sections in cache */
272 relsymname(Cache *cache, Cache *csec, Cache *strsec, Word symndx, Word symnum,
296 cache[sym->st_shndx].c_name);
310 stringtbl(Cache *cache, int symtab, Word ndx, Word shnum, const char *file,
313 Shdr *shdr = cache[ndx].c_shdr;
326 file, cache[ndx].c_name, EC_WORD(shdr->sh_link));
334 shdr = cache[ndx].c_shdr;
338 file, cache[ndx].c_name);
345 if ((cache[ndx].c_data == NULL) ||
346 (cache[ndx].c_data->d_buf == NULL)) {
348 file, cache[ndx].c_name);
358 *symsec = &cache[ndx];
366 file, cache[ndx].c_name, EC_WORD(shdr->sh_link));
371 *strsec = &cache[shdr->sh_link];
381 * cache - Cache of all section headers
382 * shnum - # of sections in cache
396 symlookup(const char *name, Cache *cache, Word shnum, Sym **sym,
439 symname = string(symtab, cnt, &cache[shdr->sh_link], file,
464 sections(const char *file, Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi)
469 Cache *_cache = &cache[seccnt];
532 * cache - Cache of all section headers
546 unwind_eh_frame(Cache *cache, Word shndx, Word shnum, Phdr *uphdr, Ehdr *ehdr,
557 Cache *_cache = &cache[shndx];
569 if (strncmp(cache[cnt].c_name, MSG_ORIG(MSG_ELF_GOT),
571 gotaddr = cache[cnt].c_shdr->sh_addr;
728 cache[eh_state->hdr_ndx].c_name,
731 cache[eh_state->frame_ndx].c_name,
865 unwind(Cache *cache, Word shnum, Word phnum, Ehdr *ehdr, uchar_t osabi,
908 Cache *_cache = &cache[cnt];
957 unwind_eh_frame(cache, cnt, shnum, uphdr, ehdr,
967 * cache - Cache of all section headers
968 * shnum - # of sections in cache
976 init_symtbl_state(SYMTBL_STATE *state, Cache *cache, Word shnum, Word secndx,
984 state->cache = cache;
987 state->seccache = &cache[secndx];
1026 if (versym && versym->cache &&
1027 (versym->cache->c_shdr->sh_link == state->secndx))
1047 Cache *_cache = &state->cache[symcnt];
1135 &state->cache[state->seccache->c_shdr->sh_link], state->file,
1156 tshdr = state->cache[shndx].c_shdr;
1157 sec = state->cache[shndx].c_name;
1175 tshdr = state->cache[shndx].c_shdr;
1176 sec = state->cache[shndx].c_name;
1320 cap_section(const char *file, Cache *cache, Word shnum, Cache *ccache,
1360 cicache = &cache[cshdr->sh_link];
1381 scache = &cache[cishdr->sh_link];
1391 if (!init_symtbl_state(&state, cache, shnum,
1414 strcache = &cache[cshdr->sh_info];
1589 chcache = &cache[cishdr->sh_info];
1695 cap(const char *file, Cache *cache, Word shnum, Word phnum, Ehdr *ehdr,
1728 Cache *_cache = &cache[cnt];
1735 if (cap_section(file, cache, shnum, _cache, osabi,
1778 interp(const char *file, Cache *cache, Word shnum, Word phnum, Elf *elf)
1810 Cache *_cache = &cache[cnt];
1859 syminfo(Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi, const char *file)
1870 if (cache[cnt].c_shdr->sh_type == SHT_SUNW_syminfo) {
1871 infocache = &cache[cnt];
1912 (cache[infoshdr->sh_info].c_shdr->sh_type != SHT_DYNAMIC)) {
1916 dyncache = &cache[infoshdr->sh_info];
1951 if (stringtbl(cache, 1, cnt, shnum, file,
2294 * cache - Cache of all section headers
2295 * shnum - # of sections in cache
2301 versions(Cache *cache, Word shnum, const char *file, uint_t flags,
2311 Cache *_cache = &cache[cnt];
2347 versym->cache = _cache;
2383 * The section is usable. Save the cache entry.
2420 &cache[verdef_cache->c_shdr->sh_link], file);
2433 &cache[verneed_cache->c_shdr->sh_link], file, versym);
2441 symbols(Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi,
2452 _cache = &cache[secndx];
2463 if (!init_symtbl_state(&state, cache, shnum, secndx, ehdr,
2484 sunw_sort(Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi,
2499 sortcache = &cache[sortsecndx];
2522 symcache = &cache[sortshdr->sh_link];
2528 if (!init_symtbl_state(&ldynsym_state, cache, shnum,
2540 symcache = &cache[symsecndx];
2554 if (!init_symtbl_state(&dynsym_state, cache, shnum,
2621 reloc(Cache *cache, Word shnum, Ehdr *ehdr, const char *file)
2631 Cache *_cache = &cache[cnt];
2671 if (stringtbl(cache, 1, cnt, shnum, file,
2707 symname = relsymname(cache, _cache, strsec, symndx,
2881 * cache - Cache of all section headers
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)
2963 Cache *_cache = &cache[cnt];
2971 (void) stringtbl(cache, 0, cnt, shnum, file,
3068 Cache *_cache = &cache[cnt], *strsec;
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)
3447 Cache *_cache = &cache[cnt];
3475 if (stringtbl(cache, 1, cnt, shnum, file,
3521 symname = relsymname(cache, _cache, strsec,
3531 (cache[shndx].c_shdr)->sh_type == SHT_NOBITS))) {
3555 Cache *pns_cache; /* Note section cache entry */
3686 note_entry(Cache *cache, Word *data, size_t size, Ehdr *ehdr, const char *file)
3695 pnstate.pns_cache = cache;
3816 note(Cache *cache, Word shnum, Ehdr *ehdr, const char *file)
3824 Cache *_cache = &cache[cnt];
3871 has_linux_abi_note(Cache *cache, Word shnum, const char *file)
3877 Cache *_cache = &cache[cnt];
3979 hash(Cache *cache, Word shnum, const char *file, uint_t flags)
3988 Cache *_cache = &cache[cnt];
4037 _cache = &cache[hshdr->sh_link];
4108 hash_entry(_cache, &cache[sshdr->sh_link], hsecname,
4125 hash_entry(_cache, &cache[sshdr->sh_link],
4171 group(Cache *cache, Word shnum, const char *file, uint_t flags)
4176 Cache *_cache = &cache[scnt];
4197 if (stringtbl(cache, 1, scnt, shnum, file,
4246 grpnam = cache[sym->st_shndx].c_name;
4261 name = cache[grpdata[gcnt]].c_name;
4270 got(Cache *cache, Word shnum, Ehdr *ehdr, const char *file)
4287 if (strncmp(cache[cnt].c_name, MSG_ORIG(MSG_ELF_GOT),
4289 gotcache = &cache[cnt];
4348 Cache *_cache = &cache[cnt];
4394 if (stringtbl(cache, 1, cnt, shnum, file,
4455 gip->g_symname = relsymname(cache, _cache,
4463 if (symlookup(MSG_ORIG(MSG_SYM_GOT), cache, shnum, &gotsym, NULL,
4508 * the section header cache to sort_shdr_ndx_arr(). Unfortunately,
4521 * section header cache.
4552 Cache *cache, *_cache;
4586 * Allocate a cache to maintain a descriptor for each section.
4588 if ((*cache_ret = cache = malloc(shnum * sizeof (Cache))) == NULL) {
4595 *cache = cache_init;
4596 _cache = cache;
4757 sort_shdr_ndx_arr_cache = cache;
4762 Cache *_cache = cache + shdr_ndx_arr[ndx];
4779 Cache *_cache1 = cache + shdr_ndx_arr[ndx1];
4821 Cache *_cache = &cache[ndx];
4853 * Generate a cache of section headers and related information
4860 create_cache(const char *file, int fd, Elf *elf, Ehdr *ehdr, Cache **cache,
4875 if (fake_shdr_cache(file, fd, elf, ehdr, cache, shnum) == 0)
4879 cache, *flags) == 0)
4895 Cache *cache;
4987 * Ideally, we wait to create the section header cache
4990 * the cache entirely.
5000 * section header cache.
5007 if (create_cache(file, fd, elf, ehdr, &cache,
5012 if (has_linux_abi_note(cache, shnum, file)) {
5067 * If we tried above to create the section header cache and failed,
5072 if (create_cache(file, fd, elf, ehdr, &cache, shstrndx,
5089 Cache *_cache = &cache[ndx];
5125 Cache *_cache = &cache[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);
5306 /* Release the memory used to cache section headers */
5309 fake_shdr_cache_free(cache, shnum);
5311 free(cache);