Lines Matching refs:ehdr
117 Ehdr *ehdr; /* ELF header for file */ member
454 sections(const char *file, Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi) in sections() argument
479 if (ehdr->e_type == ET_REL) { in sections()
490 Elf_shdr(0, osabi, ehdr->e_machine, shdr); in sections()
536 unwind_eh_frame(Cache *cache, Word shndx, Word shnum, Phdr *uphdr, Ehdr *ehdr, in unwind_eh_frame() argument
597 &frame_ptr, frame_ptr_enc, ehdr->e_ident, B_TRUE, in unwind_eh_frame()
620 fde_cnt_enc, ehdr->e_ident, B_TRUE, shdr->sh_addr, ndx, in unwind_eh_frame()
646 &initloc, table_enc, ehdr->e_ident, B_TRUE, in unwind_eh_frame()
666 table_enc, ehdr->e_ident, B_TRUE, shdr->sh_addr, in unwind_eh_frame()
693 (ehdr->e_type != ET_REL)) { in unwind_eh_frame()
698 conv_ehdr_type(osabi, ehdr->e_type, 0, &inv_buf)); in unwind_eh_frame()
701 shdr->sh_addr, ehdr->e_machine, ehdr->e_ident, gotaddr); in unwind_eh_frame()
855 unwind(Cache *cache, Word shnum, Word phnum, Ehdr *ehdr, uchar_t osabi, in unwind() argument
945 _elf_sys_encoding() != ehdr->e_ident[EI_DATA]); in unwind()
947 unwind_eh_frame(cache, cnt, shnum, uphdr, ehdr, in unwind()
967 Ehdr *ehdr, uchar_t osabi, VERSYM_STATE *versym, const char *file, in init_symtbl_state() argument
973 state->ehdr = ehdr; in init_symtbl_state()
1130 if (state->ehdr->e_type == ET_CORE) { in output_symbol()
1140 sec = conv_sym_shndx(state->osabi, state->ehdr->e_machine, in output_symbol()
1258 if (state->ehdr->e_type != ET_REL) in output_symbol()
1302 state->ehdr->e_machine, sym, verndx, gnuver, sec, symname); in output_symbol()
1310 uchar_t osabi, Ehdr *ehdr, uint_t flags) in cap_section() argument
1381 cishdr->sh_link, ehdr, osabi, NULL, file, flags)) in cap_section()
1489 ehdr->e_machine); in cap_section()
1539 (ehdr->e_ident[EI_CLASS] == ELFCLASS32) && in cap_section()
1561 ((ehdr->e_type == ET_EXEC) || (ehdr->e_type == ET_DYN))) { in cap_section()
1684 cap(const char *file, Cache *cache, Word shnum, Word phnum, Ehdr *ehdr, in cap() argument
1725 ehdr, flags)) { in cap()
1749 if (cshdr && ((ehdr->e_type == ET_EXEC) || (ehdr->e_type == ET_DYN))) { in cap()
1844 syminfo(Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi, const char *file) in syminfo() argument
2007 ehdr->e_machine, CONV_FMT_ALT_CF, &buf1), in syminfo()
2009 ehdr->e_machine, CONV_FMT_ALT_CF, &buf2)); in syminfo()
2417 symbols(Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi, in symbols() argument
2439 if (!init_symtbl_state(&state, cache, shnum, secndx, ehdr, in symbols()
2460 sunw_sort(Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi, in sunw_sort() argument
2505 symsecndx, ehdr, osabi, versym, file, flags)) in sunw_sort()
2531 symsecndx, ehdr, osabi, versym, file, flags)) in sunw_sort()
2537 conv_sec_type(osabi, ehdr->e_machine, in sunw_sort()
2597 reloc(Cache *cache, Word shnum, Ehdr *ehdr, const char *file) in reloc() argument
2662 Half mach = ehdr->e_machine; in reloc()
2719 MSG_ORIG(MSG_STR_EMPTY), ehdr->e_machine, type, in reloc()
2748 Word dynsec_cnt, Ehdr *ehdr, uchar_t osabi, const char *file) in dyn_test() argument
2797 name = conv_sec_type(osabi, ehdr->e_machine, in dyn_test()
2802 name, conv_dyn_tag(dyn->d_tag, osabi, ehdr->e_machine, in dyn_test()
2814 conv_dyn_tag(dyn->d_tag, osabi, ehdr->e_machine, in dyn_test()
2825 conv_dyn_tag(dyn->d_tag, osabi, ehdr->e_machine, in dyn_test()
2836 conv_dyn_tag(dyn->d_tag, osabi, ehdr->e_machine, in dyn_test()
2866 Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi, const char *file) in dyn_symtest() argument
2891 osabi, ehdr->e_machine, CONV_FMT_ALT_CF, &buf), in dyn_symtest()
2900 dynamic(Cache *cache, Word shnum, Ehdr *ehdr, uchar_t osabi, const char *file) in dynamic() argument
3210 sec._sec_field, dyn, dynsec_cnt, ehdr, \ in dynamic()
3214 sec._sec_field, dyn, dynsec_cnt, ehdr, \ in dynamic()
3218 sec._sec_field, dyn, dynsec_cnt, ehdr, \ in dynamic()
3224 sec.fini, cache, shnum, ehdr, osabi, file); in dynamic()
3243 sec.init, cache, shnum, ehdr, osabi, file); in dynamic()
3406 osabi, ehdr->e_machine); in dynamic()
3662 note_entry(Cache *cache, Word *data, size_t size, Ehdr *ehdr, const char *file) in note_entry() argument
3674 do_swap = _elf_sys_encoding() != ehdr->e_ident[EI_DATA]; in note_entry()
3688 is_corenote = (ehdr->e_type == ET_CORE) && in note_entry()
3739 corenote_ret = corenote(ehdr->e_machine, in note_entry()
3760 conv_ehdr_mach(ehdr->e_machine, in note_entry()
3792 note(Cache *cache, Word shnum, Ehdr *ehdr, const char *file) in note() argument
3831 (Word)_cache->c_data->d_size, ehdr, file); in note()
4192 got(Cache *cache, Word shnum, Ehdr *ehdr, const char *file) in got() argument
4221 if (ehdr->e_type == ET_REL) { in got()
4341 ehdr->e_machine); in got()
4347 ehdr->e_machine); in got()
4407 Elf_got_entry(0, gindex, gaddr, gotentry, ehdr->e_machine, in got()
4408 ehdr->e_ident[EI_DATA], sys_encoding, in got()
4459 shdr_cache(const char *file, Elf *elf, Ehdr *ehdr, size_t shstrndx, in shdr_cache() argument
4719 bgn1 = ehdr->e_shoff; in shdr_cache()
4720 end1 = ehdr->e_shoff + (ehdr->e_shentsize * ehdr->e_shnum); in shdr_cache()
4774 create_cache(const char *file, int fd, Elf *elf, Ehdr *ehdr, Cache **cache, in create_cache() argument
4789 if (fake_shdr_cache(file, fd, elf, ehdr, cache, shnum) == 0) in create_cache()
4792 if (shdr_cache(file, elf, ehdr, shstrndx, *shnum, in create_cache()
4806 Ehdr *ehdr; in regular() local
4814 if ((ehdr = elf_getehdr(elf)) == NULL) { in regular()
4857 Elf_ehdr(0, ehdr, shdr); in regular()
4869 if (ehdr->e_machine == EM_AMD64) in regular()
4874 if (ehdr->e_phoff & (addr_align - 1)) in regular()
4876 if (ehdr->e_shoff & (addr_align - 1)) in regular()
4896 osabi = ehdr->e_ident[EI_OSABI]; in regular()
4921 if (create_cache(file, fd, elf, ehdr, &cache, in regular()
4964 Elf_phdr(0, osabi, ehdr->e_machine, phdr); in regular()
4986 if (create_cache(file, fd, elf, ehdr, &cache, shstrndx, in regular()
5142 sections(file, cache, shnum, ehdr, osabi); in regular()
5151 symbols(cache, shnum, ehdr, osabi, &versym, file, flags); in regular()
5154 sunw_sort(cache, shnum, ehdr, osabi, &versym, file, flags); in regular()
5160 got(cache, shnum, ehdr, file); in regular()
5166 syminfo(cache, shnum, ehdr, osabi, file); in regular()
5169 reloc(cache, shnum, ehdr, file); in regular()
5172 dynamic(cache, shnum, ehdr, osabi, file); in regular()
5179 note_cnt = note(cache, shnum, ehdr, file); in regular()
5197 if ((note_cnt == 0) && (ehdr->e_type == ET_CORE) && in regular()
5199 (fake_shdr_cache(file, fd, elf, ehdr, in regular()
5201 (void) note(note_cache, note_shnum, ehdr, file); in regular()
5213 cap(file, cache, shnum, phnum, ehdr, osabi, elf, flags); in regular()
5217 unwind(cache, shnum, phnum, ehdr, osabi, file, elf, flags); in regular()