Lines Matching refs:file
4 * The contents of this file are subject to the terms of the
6 * You may not use this file except in compliance with the License.
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
32 * Dump an elf file.
120 const char *file; /* Name of file */
121 Ehdr *ehdr; /* ELF header for file */
198 string(Cache *refsec, Word ndx, Cache *strsec, const char *file, Word name)
233 file, strsec->c_ndx, refsec->c_ndx);
249 file, strsec->c_name);
254 file, refsec->c_name, EC_WORD(ndx), strsec->c_name,
273 Word relndx, Sym *syms, char *secstr, size_t secsz, const char *file)
280 file, EC_WORD(symndx), EC_WORD(relndx));
285 name = string(csec, symndx, strsec, file, sym->st_name);
310 stringtbl(Cache *cache, int symtab, Word ndx, Word shnum, const char *file,
326 file, cache[ndx].c_name, EC_WORD(shdr->sh_link));
338 file, cache[ndx].c_name);
348 file, cache[ndx].c_name);
366 file, cache[ndx].c_name, EC_WORD(shdr->sh_link));
386 * file - Name of file
397 Cache *target, Cache *symtab, const char *file)
413 file, symtab->c_name);
428 file, symtab->c_name, EC_WORD(shdr->sh_link));
439 symname = string(symtab, cnt, &cache[shdr->sh_link], file,
464 sections(const char *file, Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi)
479 file, secname, EC_WORD(shdr->sh_type));
493 MSG_INTL(MSG_GOT_UNEXPECTED), file,
508 getphdr(Word phnum, Word *type_arr, Word type_cnt, const char *file, Elf *elf)
514 failure(file, MSG_ORIG(MSG_ELF_GETPHDR));
537 * ehdr - ELF header for file
542 * file - Name of file
547 gnu_eh_state_t *eh_state, uchar_t osabi, const char *file, uint_t flags)
578 file, _cache ->c_name);
594 file, EC_WORD(shndx), _cache->c_name);
611 file, _cache->c_name);
615 file, _cache->c_name, frame_ptr_enc);
634 file, _cache->c_name);
638 file, _cache->c_name, fde_cnt_enc);
660 MSG_INTL(MSG_ERR_DWOVRFLW), file,
665 MSG_INTL(MSG_ERR_DWBADENC), file,
673 MSG_INTL(MSG_ERR_BADSORT), file,
680 MSG_INTL(MSG_ERR_DWOVRFLW), file,
685 MSG_INTL(MSG_ERR_DWBADENC), file,
707 file, EC_WORD(shndx), _cache->c_name,
710 dump_eh_frame(file, _cache->c_name, data, datasize,
727 file, EC_WORD(eh_state->hdr_ndx),
783 unwind_exception_ranges(Cache *_cache, const char *file, int do_swap)
838 file, _cache->c_name, EC_WORD(i));
866 const char *file, Elf *elf, uint_t flags)
899 sizeof (phdr_types) / sizeof (*phdr_types), file, elf);
954 unwind_exception_ranges(_cache, file,
958 &eh_state, osabi, file, flags);
970 * ehdr - ELF header for file
972 * file - Name of file
977 Ehdr *ehdr, uchar_t osabi, VERSYM_STATE *versym, const char *file,
982 state->file = file;
1002 file, state->secname);
1018 file, state->secname, EC_WORD(shdr->sh_link));
1122 state->file, state->secname, EC_WORD(symndx));
1135 &state->cache[state->seccache->c_shdr->sh_link], state->file,
1165 state->file, state->secname,
1171 state->file, state->secname,
1181 state->file, state->secname, EC_WORD(symndx));
1186 MSG_INTL(MSG_ERR_BADSYM5), state->file,
1204 * the file. The interpretation of this depends on
1221 state->file, state->secname, EC_WORD(symndx),
1237 MSG_INTL(MSG_ERR_BADSYM3), state->file,
1244 MSG_INTL(MSG_ERR_BADSYM4), state->file,
1273 MSG_INTL(MSG_ERR_BADSYM6), state->file,
1295 MSG_INTL(MSG_ERR_BADSYM7), state->file,
1304 MSG_INTL(MSG_ERR_BADSYM8), state->file,
1320 cap_section(const char *file, Cache *cache, Word shnum, Cache *ccache,
1336 file, ccache->c_name);
1356 file, ccache->c_name, EC_WORD(cshdr->sh_link));
1365 file, ccache->c_name, EC_WORD(cshdr->sh_link));
1378 file, cicache->c_name, EC_WORD(cishdr->sh_link));
1387 file, cicache->c_name, EC_WORD(cishdr->sh_link));
1392 cishdr->sh_link, ehdr, osabi, NULL, file, flags))
1410 file, ccache->c_name, EC_WORD(cshdr->sh_info));
1419 file, ccache->c_name, EC_WORD(cshdr->sh_info));
1495 MSG_INTL(MSG_WARN_INVCAP4), file,
1519 MSG_INTL(MSG_ERR_INVCAP), file,
1553 file, ccache->c_name);
1585 file, cicache->c_name, EC_WORD(cishdr->sh_info));
1594 file, cicache->c_name, EC_WORD(cishdr->sh_info));
1624 name = string(cicache, inum, strcache, file,
1642 MSG_INTL(MSG_ERR_INVCAPINFO3), file,
1655 MSG_INTL(MSG_ERR_CHBADSYMNDX), file,
1662 strcache, file, sym->st_name);
1688 * object file. If this is a dynamic object, this group should be associated
1695 cap(const char *file, Cache *cache, Word shnum, Word phnum, Ehdr *ehdr,
1711 failure(file, MSG_ORIG(MSG_ELF_GETPHDR));
1735 if (cap_section(file, cache, shnum, _cache, osabi,
1753 (void) fprintf(stderr, MSG_INTL(MSG_WARN_INVCAP1), file);
1763 file, EC_WORD(elf_ndxscn(ccache->c_scn)),
1768 file, EC_WORD(elf_ndxscn(ccache->c_scn)),
1778 interp(const char *file, Cache *cache, Word shnum, Word phnum, Elf *elf)
1796 sizeof (phdr_types) / sizeof (*phdr_types), file, elf);
1842 (void) fprintf(stderr, MSG_INTL(MSG_WARN_INVINTERP1), file);
1850 (void) fprintf(stderr, MSG_INTL(MSG_WARN_INVINTERP2), file,
1859 syminfo(Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi, const char *file)
1881 file, infocache->c_name);
1907 MSG_INTL(MSG_ERR_BADSHINFO), file,
1914 file, infocache->c_name, EC_WORD(infoshdr->sh_info));
1920 file, dyncache->c_name);
1926 file, dyncache->c_name);
1942 file, strerror(err));
1951 if (stringtbl(cache, 1, cnt, shnum, file,
1974 name = string(infocache, ndx, strsec, file, sym->st_name);
1991 MSG_INTL(MSG_ERR_BADSIDYNNDX), file,
2025 file, infocache->c_ndx, infocache->c_name,
2056 strsec, file, dyns[boundto].d_un.d_val);
2072 const char *file)
2090 name = string(vcache, cnt, scache, file, vdap->vda_name);
2093 dep = string(vcache, cnt, scache, file, vdap->vda_name);
2110 dep = string(vcache, cnt, scache, file,
2126 * file - Name of object being processed.
2139 * this file, and the Verneed entries do not have associated version
2156 const char *file, VERSYM_STATE *versym)
2172 * Obtain the name of the needed file and the version name
2177 name = string(vcache, cnt, scache, file, vnd->vn_file);
2179 dep = string(vcache, cnt, scache, file, vnap->vna_name);
2204 dep = string(vcache, cnt, scache, file,
2296 * file - Name of file
2301 versions(Cache *cache, Word shnum, const char *file, uint_t flags,
2363 file, _cache->c_name);
2369 file, _cache->c_name,
2377 MSG_INTL(MSG_ERR_BADSHLINK), file,
2420 &cache[verdef_cache->c_shdr->sh_link], file);
2433 &cache[verneed_cache->c_shdr->sh_link], file, versym);
2442 VERSYM_STATE *versym, const char *file, uint_t flags)
2464 osabi, versym, file, flags))
2485 VERSYM_STATE *versym, const char *file, uint_t flags)
2518 file, sortcache->c_name,
2529 symsecndx, ehdr, osabi, versym, file, flags))
2548 file, sortcache->c_name);
2555 symsecndx, ehdr, osabi, versym, file, flags))
2560 file, sortcache->c_name,
2583 MSG_INTL(MSG_ERR_LDYNNOTADJ), file,
2621 reloc(Cache *cache, Word shnum, Ehdr *ehdr, const char *file)
2658 file, relname);
2671 if (stringtbl(cache, 1, cnt, shnum, file,
2708 symnum, relndx, syms, section, BUFSIZ, file);
2736 MSG_INTL(MSG_ERR_BADREL1), file,
2767 * ehdr - ELF header for file
2768 * file - Name of file
2772 Word dynsec_cnt, Ehdr *ehdr, uchar_t osabi, const char *file)
2803 * the section in the file.
2825 (void) fprintf(stderr, MSG_INTL(MSG_ERR_DYNNOBCKSEC), file,
2837 MSG_INTL(MSG_ERR_DYNBADADDR), file,
2848 MSG_INTL(MSG_ERR_DYNBADSIZE), file,
2859 MSG_INTL(MSG_ERR_DYNBADENTSIZE), file,
2883 * ehdr - ELF header for file
2885 * file - Name of file
2890 Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi, const char *file)
2912 _cache, file) && (sym->st_value != dyn->d_un.d_val))
2914 file, _cache->c_name, conv_dyn_tag(dyn->d_tag,
2924 dynamic(Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi, const char *file)
2971 (void) stringtbl(cache, 0, cnt, shnum, file,
3059 file, EC_WORD(dynsec_num));
3079 if (stringtbl(cache, 0, cnt, shnum, file, 0, 0, &strsec) == 0)
3084 file, _cache->c_name);
3189 file, dyn->d_un.d_ptr);
3196 file, dyn->d_un.d_ptr);
3235 osabi, file)
3239 osabi, file)
3243 osabi, file)
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)
3462 file, _cache->c_name);
3475 if (stringtbl(cache, 1, cnt, shnum, file,
3508 MSG_INTL(MSG_ERR_BADMINFO), file,
3522 symndx, symnum, ndx, syms, section, BUFSIZ, file);
3533 MSG_INTL(MSG_ERR_BADSYM2), file,
3686 note_entry(Cache *cache, Word *data, size_t size, Ehdr *ehdr, const char *file)
3694 pnstate.pns_file = file;
3776 file);
3783 file,
3790 file,
3816 note(Cache *cache, Word shnum, Ehdr *ehdr, const char *file)
3842 * even if the actual file is misaligned.
3846 file, _cache->c_name);
3855 (Word)_cache->c_data->d_size, ehdr, file);
3871 has_linux_abi_note(Cache *cache, Word shnum, const char *file)
3891 pnstate.pns_file = file;
3935 Word symndx, Word symn, Sym *syms, const char *file, ulong_t bkts,
3944 (void) fprintf(stderr, MSG_INTL(MSG_ERR_HSBADSYMNDX), file,
3949 symname = string(refsec, symndx, strsec, file, sym->st_name);
3971 (void) fprintf(stderr, MSG_INTL(MSG_ERR_BADHASH), file,
3979 hash(Cache *cache, Word shnum, const char *file, uint_t flags)
4002 file, hsecname);
4008 file, hsecname);
4024 file, hsecname);
4033 file, hsecname, EC_WORD(hshdr->sh_link));
4045 file, ssecname);
4053 file, ssecname);
4065 file, ssecname);
4074 file, ssecname, EC_WORD(sshdr->sh_link));
4102 MSG_INTL(MSG_ERR_BADCHAINIDX), file,
4109 ndx, *hash, symn, syms, file, bkts, flags, 0);
4120 MSG_INTL(MSG_ERR_BADCHAINIDX), file,
4126 hsecname, ndx, _ndx, symn, syms, file,
4134 MSG_INTL(MSG_HASH_OVERFLW), file,
4171 group(Cache *cache, Word shnum, const char *file, uint_t flags)
4197 if (stringtbl(cache, 1, scnt, shnum, file,
4213 file, _cache->c_name, EC_WORD(shdr->sh_info));
4243 grpnam = string(_cache, 0, strsec, file, sym->st_name);
4270 got(Cache *cache, Word shnum, Ehdr *ehdr, const char *file)
4300 (void) fprintf(stderr, MSG_INTL(MSG_GOT_UNEXPECTED), file,
4307 file, gotcache->c_name);
4330 (void) fprintf(stderr, MSG_INTL(MSG_ERR_MALLOC), file,
4381 file, _cache->c_name);
4394 if (stringtbl(cache, 1, cnt, shnum, file,
4438 file, gotcache->c_name);
4449 MSG_INTL(MSG_GOT_MULTIPLE), file,
4457 section, BUFSIZ, file);
4464 symtab, file))
4544 shdr_cache(const char *file, Elf *elf, Ehdr *ehdr, size_t shstrndx,
4566 (void) fprintf(stderr, MSG_INTL(MSG_ERR_NOSHSTRSEC), file);
4568 failure(file, MSG_ORIG(MSG_ELF_GETSCN));
4573 failure(file, MSG_ORIG(MSG_ELF_GETDATA));
4578 failure(file, MSG_ORIG(MSG_ELF_GETSHDR));
4583 (void) fprintf(stderr, MSG_INTL(MSG_ERR_SHSTRNULL), file);
4591 file, strerror(err));
4601 * each section that has data in the ELF file:
4616 file, strerror(err));
4622 * Traverse the sections of the file. This gathering of data is
4631 * header overlap occur, and a file needs translating (ie. xlate'ing
4632 * information from a non-native architecture file), then the process
4647 failure(file, MSG_ORIG(MSG_ELF_GETSHDR));
4653 * If this section has data in the file, include it in
4698 file, strerror(err));
4718 MSG_INTL(MSG_ERR_BADSHNAME), file,
4735 file, strerror(err));
4751 * data from the file is questionable. However, it might still be
4772 * are no overlaps in a properly formed ELF file, in which
4774 * to O(n^2) for a completely broken file. Such a file is
4788 MSG_INTL(MSG_ERR_SECMEMOVER), file,
4810 MSG_INTL(MSG_ERR_SHDRMEMOVER), file, EC_OFF(bgn1),
4825 failure(file, MSG_ORIG(MSG_ELF_GETDATA));
4843 file, _cache->c_name);
4854 * for use by the rest of elfdump. If requested (or the file
4857 * Otherwise, we use the real section headers contained in the file.
4860 create_cache(const char *file, int fd, Elf *elf, Ehdr *ehdr, Cache **cache,
4870 (void) fprintf(stderr, MSG_INTL(MSG_ERR_NOSHDR), file);
4875 if (fake_shdr_cache(file, fd, elf, ehdr, cache, shnum) == 0)
4878 if (shdr_cache(file, elf, ehdr, shstrndx, *shnum,
4887 regular(const char *file, int fd, Elf *elf, uint_t flags,
4901 failure(file, MSG_ORIG(MSG_ELF_GETEHDR));
4906 failure(file, MSG_ORIG(MSG_ELF_GETSHDRNUM));
4911 failure(file, MSG_ORIG(MSG_ELF_GETSHDRSTRNDX));
4916 failure(file, MSG_ORIG(MSG_ELF_GETPHDRNUM));
4921 * program headers (-P option) and this file doesn't have
4925 (void) fprintf(stderr, MSG_INTL(MSG_ERR_PNEEDSPH), file);
4932 failure(file, MSG_ORIG(MSG_ELF_GETSHDR));
4961 (void) fprintf(stderr, MSG_INTL(MSG_ERR_BADPHDRALIGN), file);
4963 (void) fprintf(stderr, MSG_INTL(MSG_ERR_BADSHDRALIGN), file);
4973 * to display a completely generic view of the file.
4981 /* Determine osabi from file */
5007 if (create_cache(file, fd, elf, ehdr, &cache,
5012 if (has_linux_abi_note(cache, shnum, file)) {
5016 MSG_INTL(MSG_INFO_LINUXOSABI), file,
5039 failure(file, MSG_ORIG(MSG_ELF_GETPHDR));
5072 if (create_cache(file, fd, elf, ehdr, &cache, shstrndx,
5104 * ELF file, but by system resources.
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);
5277 * - This is a core file
5285 (fake_shdr_cache(file, fd, elf, ehdr,
5287 (void) note(note_cache, note_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);