Lines Matching refs:ec

114 	int ec, elftype;  in _libelf_compute_section_extents()  local
123 ec = e->e_class; in _libelf_compute_section_extents()
127 if (ec == ELFCLASS32) { in _libelf_compute_section_extents()
150 sh_align = _libelf_falign(elftype, ec); in _libelf_compute_section_extents()
227 if ((msz = _libelf_msize(d->d_type, ec, e->e_version)) == 0) in _libelf_compute_section_extents()
259 fsz = _libelf_fsize(d->d_type, ec, d->d_version, in _libelf_compute_section_extents()
282 sh_offset % _libelf_falign(elftype, ec)) { in _libelf_compute_section_extents()
305 (sh_entsize = _libelf_fsize(elftype, ec, e->e_version, in _libelf_compute_section_extents()
321 if (ec == ELFCLASS32) { in _libelf_compute_section_extents()
450 int ec; in _libelf_resync_sections() local
454 ec = e->e_class; in _libelf_resync_sections()
461 if (ec == ELFCLASS32) in _libelf_resync_sections()
511 int ec, eh_class; in _libelf_resync_elf() local
522 ec = e->e_class; in _libelf_resync_elf()
524 assert(ec == ELFCLASS32 || ec == ELFCLASS64); in _libelf_resync_elf()
529 if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL) in _libelf_resync_elf()
535 if (ec == ELFCLASS32) { in _libelf_resync_elf()
594 if (ec == ELFCLASS32) in _libelf_resync_elf()
595 INITIALIZE_EHDR(eh32, ec, eh_version); in _libelf_resync_elf()
597 INITIALIZE_EHDR(eh64, ec, eh_version); in _libelf_resync_elf()
601 rc += (off_t) _libelf_fsize(ELF_T_EHDR, ec, eh_version, (size_t) 1); in _libelf_resync_elf()
613 fsz = _libelf_fsize(ELF_T_PHDR, ec, eh_version, phnum); in _libelf_resync_elf()
614 align = _libelf_falign(ELF_T_PHDR, ec); in _libelf_resync_elf()
635 phdr = _libelf_getphdr(e, ec); in _libelf_resync_elf()
669 fsz = _libelf_fsize(ELF_T_SHDR, ec, eh_version, shnum); in _libelf_resync_elf()
670 align = _libelf_falign(ELF_T_SHDR, ec); in _libelf_resync_elf()
693 _libelf_setphnum(e, ehdr, ec, phnum); in _libelf_resync_elf()
694 _libelf_setshnum(e, ehdr, ec, shnum); in _libelf_resync_elf()
701 if (ec == ELFCLASS32) { in _libelf_resync_elf()
721 int ec, em; in _libelf_write_scn() local
735 if ((ec = e->e_class) == ELFCLASS32) { in _libelf_write_scn()
753 assert(sh_off % _libelf_falign(elftype, ec) == 0); in _libelf_write_scn()
808 if ((msz = _libelf_msize(d->d_type, ec, e->e_version)) == 0) in _libelf_write_scn()
825 fsz = _libelf_fsize(d->d_type, ec, e->e_version, nobjects); in _libelf_write_scn()
830 if (_libelf_xlate(&dst, d, e->e_byteorder, ec, em, ELF_TOFILE) in _libelf_write_scn()
847 int ec, em; in _libelf_write_ehdr() local
855 ec = e->e_class; in _libelf_write_ehdr()
857 ehdr = _libelf_ehdr(e, ec, 0); in _libelf_write_ehdr()
860 fsz = _libelf_fsize(ELF_T_EHDR, ec, e->e_version, (size_t) 1); in _libelf_write_ehdr()
861 if ((msz = _libelf_msize(ELF_T_EHDR, ec, e->e_version)) == 0) in _libelf_write_ehdr()
877 if (_libelf_xlate(&dst, &src, e->e_byteorder, ec, em, ELF_TOFILE) == in _libelf_write_ehdr()
891 int ec, em; in _libelf_write_phdr() local
901 ec = e->e_class; in _libelf_write_phdr()
903 ehdr = _libelf_ehdr(e, ec, 0); in _libelf_write_phdr()
909 if (ec == ELFCLASS32) { in _libelf_write_phdr()
921 assert(phoff % _libelf_falign(ELF_T_PHDR, ec) == 0); in _libelf_write_phdr()
926 if ((msz = _libelf_msize(ELF_T_PHDR, ec, e->e_version)) == 0) in _libelf_write_phdr()
928 fsz = _libelf_fsize(ELF_T_PHDR, ec, e->e_version, phnum); in _libelf_write_phdr()
931 src.d_buf = _libelf_getphdr(e, ec); in _libelf_write_phdr()
939 if (_libelf_xlate(&dst, &src, e->e_byteorder, ec, em, ELF_TOFILE) == in _libelf_write_phdr()
953 int ec, em; in _libelf_write_shdr() local
964 ec = e->e_class; in _libelf_write_shdr()
966 ehdr = _libelf_ehdr(e, ec, 0); in _libelf_write_shdr()
971 if (ec == ELFCLASS32) { in _libelf_write_shdr()
982 assert(shoff % _libelf_falign(ELF_T_SHDR, ec) == 0); in _libelf_write_shdr()
988 if ((msz = _libelf_msize(ELF_T_SHDR, ec, e->e_version)) == 0) in _libelf_write_shdr()
995 fsz = _libelf_fsize(ELF_T_SHDR, ec, e->e_version, (size_t) 1); in _libelf_write_shdr()
998 if (ec == ELFCLASS32) in _libelf_write_shdr()
1006 if (_libelf_xlate(&dst, &src, e->e_byteorder, ec, em, in _libelf_write_shdr()
1199 int ec; in elf_update() local
1211 if ((ec = e->e_class) != ELFCLASS32 && ec != ELFCLASS64) { in elf_update()