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;
321 file, cache[ndx].c_name, EC_WORD(shdr->sh_link));
326 file, cache[ndx].c_name);
333 if ((cache[ndx].c_data == NULL) ||
334 (cache[ndx].c_data->d_buf == NULL)) {
336 file, cache[ndx].c_name);
344 shdr = cache[ndx].c_shdr;
352 *symsec = &cache[ndx];
360 file, cache[ndx].c_name, EC_WORD(shdr->sh_link));
365 *strsec = &cache[shdr->sh_link];
375 * cache - Cache of all section headers
376 * shnum - # of sections in cache
390 symlookup(const char *name, Cache *cache, Word shnum, Sym **sym,
433 symname = string(symtab, cnt, &cache[shdr->sh_link], file,
458 sections(const char *file, Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi)
463 Cache *_cache = &cache[seccnt];
526 * cache - Cache of all section headers
540 unwind_eh_frame(Cache *cache, Word shndx, Word shnum, Phdr *uphdr, Ehdr *ehdr,
551 Cache *_cache = &cache[shndx];
563 if (strncmp(cache[cnt].c_name, MSG_ORIG(MSG_ELF_GOT),
565 gotaddr = cache[cnt].c_shdr->sh_addr;
722 cache[eh_state->hdr_ndx].c_name,
725 cache[eh_state->frame_ndx].c_name,
859 unwind(Cache *cache, Word shnum, Word phnum, Ehdr *ehdr, uchar_t osabi,
902 Cache *_cache = &cache[cnt];
951 unwind_eh_frame(cache, cnt, shnum, uphdr, ehdr,
961 * cache - Cache of all section headers
962 * shnum - # of sections in cache
970 init_symtbl_state(SYMTBL_STATE *state, Cache *cache, Word shnum, Word secndx,
978 state->cache = cache;
981 state->seccache = &cache[secndx];
1019 if (versym && versym->cache &&
1020 (versym->cache->c_shdr->sh_link == state->secndx))
1040 Cache *_cache = &state->cache[symcnt];
1128 &state->cache[state->seccache->c_shdr->sh_link], state->file,
1149 tshdr = state->cache[shndx].c_shdr;
1150 sec = state->cache[shndx].c_name;
1168 tshdr = state->cache[shndx].c_shdr;
1169 sec = state->cache[shndx].c_name;
1313 cap_section(const char *file, Cache *cache, Word shnum, Cache *ccache,
1353 cicache = &cache[cshdr->sh_link];
1374 scache = &cache[cishdr->sh_link];
1384 if (!init_symtbl_state(&state, cache, shnum,
1407 strcache = &cache[cshdr->sh_info];
1582 chcache = &cache[cishdr->sh_info];
1688 cap(const char *file, Cache *cache, Word shnum, Word phnum, Ehdr *ehdr,
1721 Cache *_cache = &cache[cnt];
1728 if (cap_section(file, cache, shnum, _cache, osabi,
1771 interp(const char *file, Cache *cache, Word shnum, Word phnum, Elf *elf)
1803 Cache *_cache = &cache[cnt];
1848 syminfo(Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi, const char *file)
1859 if (cache[cnt].c_shdr->sh_type == SHT_SUNW_syminfo) {
1860 infocache = &cache[cnt];
1901 (cache[infoshdr->sh_info].c_shdr->sh_type != SHT_DYNAMIC)) {
1905 dyncache = &cache[infoshdr->sh_info];
1933 if (stringtbl(cache, 1, cnt, shnum, file,
2276 * cache - Cache of all section headers
2277 * shnum - # of sections in cache
2283 versions(Cache *cache, Word shnum, const char *file, uint_t flags,
2293 Cache *_cache = &cache[cnt];
2327 versym->cache = _cache;
2363 * The section is usable. Save the cache entry.
2400 &cache[verdef_cache->c_shdr->sh_link], file);
2413 &cache[verneed_cache->c_shdr->sh_link], file, versym);
2421 symbols(Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi,
2432 _cache = &cache[secndx];
2443 if (!init_symtbl_state(&state, cache, shnum, secndx, ehdr,
2464 sunw_sort(Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi,
2479 sortcache = &cache[sortsecndx];
2502 symcache = &cache[sortshdr->sh_link];
2508 if (!init_symtbl_state(&ldynsym_state, cache, shnum,
2520 symcache = &cache[symsecndx];
2534 if (!init_symtbl_state(&dynsym_state, cache, shnum,
2601 reloc(Cache *cache, Word shnum, Ehdr *ehdr, const char *file)
2611 Cache *_cache = &cache[cnt];
2651 if (stringtbl(cache, 1, cnt, shnum, file,
2687 symname = relsymname(cache, _cache, strsec, symndx,
2861 * cache - Cache of all section headers
2862 * shnum - # of sections in cache
2870 Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi, const char *file)
2891 symlookup(symname, cache, shnum, &sym, target_cache,
2904 dynamic(Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi, const char *file)
2943 Cache *_cache = &cache[cnt];
2951 (void) stringtbl(cache, 0, cnt, shnum, file,
3048 Cache *_cache = &cache[cnt], *strsec;
3059 if (stringtbl(cache, 0, cnt, shnum, file, 0, 0, &strsec) == 0)
3228 sec.fini, cache, shnum, ehdr, osabi, file);
3247 sec.init, cache, shnum, ehdr, osabi, file);
3419 move(Cache *cache, Word shnum, const char *file, uint_t flags)
3427 Cache *_cache = &cache[cnt];
3455 if (stringtbl(cache, 1, cnt, shnum, file,
3501 symname = relsymname(cache, _cache, strsec,
3511 (cache[shndx].c_shdr)->sh_type == SHT_NOBITS))) {
3535 Cache *pns_cache; /* Note section cache entry */
3666 note_entry(Cache *cache, Word *data, size_t size, Ehdr *ehdr, const char *file)
3675 pnstate.pns_cache = cache;
3796 note(Cache *cache, Word shnum, Ehdr *ehdr, const char *file)
3804 Cache *_cache = &cache[cnt];
3851 has_linux_abi_note(Cache *cache, Word shnum, const char *file)
3857 Cache *_cache = &cache[cnt];
3957 hash(Cache *cache, Word shnum, const char *file, uint_t flags)
3966 Cache *_cache = &cache[cnt];
4000 _cache = &cache[hshdr->sh_link];
4041 hash_entry(_cache, &cache[sshdr->sh_link], hsecname,
4051 hash_entry(_cache, &cache[sshdr->sh_link],
4097 group(Cache *cache, Word shnum, const char *file, uint_t flags)
4102 Cache *_cache = &cache[scnt];
4123 if (stringtbl(cache, 1, scnt, shnum, file,
4172 grpnam = cache[sym->st_shndx].c_name;
4187 name = cache[grpdata[gcnt]].c_name;
4196 got(Cache *cache, Word shnum, Ehdr *ehdr, const char *file)
4213 if (strncmp(cache[cnt].c_name, MSG_ORIG(MSG_ELF_GOT),
4215 gotcache = &cache[cnt];
4274 Cache *_cache = &cache[cnt];
4320 if (stringtbl(cache, 1, cnt, shnum, file,
4374 gip->g_symname = relsymname(cache, _cache,
4382 if (symlookup(MSG_ORIG(MSG_SYM_GOT), cache, shnum, &gotsym, NULL,
4427 * the section header cache to sort_shdr_ndx_arr(). Unfortunately,
4440 * section header cache.
4471 Cache *cache, *_cache;
4505 * Allocate a cache to maintain a descriptor for each section.
4507 if ((*cache_ret = cache = malloc(shnum * sizeof (Cache))) == NULL) {
4514 *cache = cache_init;
4515 _cache = cache;
4676 sort_shdr_ndx_arr_cache = cache;
4681 Cache *_cache = cache + shdr_ndx_arr[ndx];
4698 Cache *_cache1 = cache + shdr_ndx_arr[ndx1];
4740 Cache *_cache = &cache[ndx];
4772 * Generate a cache of section headers and related information
4779 create_cache(const char *file, int fd, Elf *elf, Ehdr *ehdr, Cache **cache,
4794 if (fake_shdr_cache(file, fd, elf, ehdr, cache, shnum) == 0)
4798 cache, *flags) == 0)
4814 Cache *cache;
4906 * Ideally, we wait to create the section header cache
4909 * the cache entirely.
4919 * section header cache.
4926 if (create_cache(file, fd, elf, ehdr, &cache,
4931 if (has_linux_abi_note(cache, shnum, file)) {
4986 * If we tried above to create the section header cache and failed,
4991 if (create_cache(file, fd, elf, ehdr, &cache, shstrndx,
5008 Cache *_cache = &cache[ndx];
5044 Cache *_cache = &cache[ndx];
5147 sections(file, cache, shnum, ehdr, osabi);
5150 interp(file, cache, shnum, phnum, elf);
5153 versions(cache, shnum, file, flags, &versym);
5156 symbols(cache, shnum, ehdr, osabi, &versym, file, flags);
5159 sunw_sort(cache, shnum, ehdr, osabi, &versym, file, flags);
5162 hash(cache, shnum, file, flags);
5165 got(cache, shnum, ehdr, file);
5168 group(cache, shnum, file, flags);
5171 syminfo(cache, shnum, ehdr, osabi, file);
5174 reloc(cache, shnum, ehdr, file);
5177 dynamic(cache, shnum, ehdr, osabi, file);
5184 note_cnt = note(cache, shnum, ehdr, file);
5212 move(cache, shnum, file, flags);
5218 cap(file, cache, shnum, phnum, ehdr, osabi, elf, flags);
5222 unwind(cache, shnum, phnum, ehdr, osabi, file, elf, flags);
5225 /* Release the memory used to cache section headers */
5228 fake_shdr_cache_free(cache, shnum);
5230 free(cache);