Lines Matching refs:ec

115 	int ec, elftype;  in _libelf_compute_section_extents()  local
124 ec = e->e_class; in _libelf_compute_section_extents()
128 if (ec == ELFCLASS32) { in _libelf_compute_section_extents()
151 sh_align = _libelf_falign(elftype, ec); in _libelf_compute_section_extents()
228 if ((msz = _libelf_msize(d->d_type, ec, e->e_version)) == 0) in _libelf_compute_section_extents()
260 fsz = _libelf_fsize(d->d_type, ec, d->d_version, in _libelf_compute_section_extents()
283 sh_offset % _libelf_falign(elftype, ec)) { in _libelf_compute_section_extents()
306 (sh_entsize = _libelf_fsize(elftype, ec, e->e_version, in _libelf_compute_section_extents()
322 if (ec == ELFCLASS32) { in _libelf_compute_section_extents()
451 int ec; in _libelf_resync_sections() local
455 ec = e->e_class; in _libelf_resync_sections()
462 if (ec == ELFCLASS32) in _libelf_resync_sections()
512 int ec, eh_class; in _libelf_resync_elf() local
523 ec = e->e_class; in _libelf_resync_elf()
525 assert(ec == ELFCLASS32 || ec == ELFCLASS64); in _libelf_resync_elf()
530 if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL) in _libelf_resync_elf()
536 if (ec == ELFCLASS32) { in _libelf_resync_elf()
595 if (ec == ELFCLASS32) in _libelf_resync_elf()
596 INITIALIZE_EHDR(eh32, ec, eh_version); in _libelf_resync_elf()
598 INITIALIZE_EHDR(eh64, ec, eh_version); in _libelf_resync_elf()
602 rc += (off_t) _libelf_fsize(ELF_T_EHDR, ec, eh_version, (size_t) 1); in _libelf_resync_elf()
614 fsz = _libelf_fsize(ELF_T_PHDR, ec, eh_version, phnum); in _libelf_resync_elf()
615 align = _libelf_falign(ELF_T_PHDR, ec); in _libelf_resync_elf()
636 phdr = _libelf_getphdr(e, ec); in _libelf_resync_elf()
670 fsz = _libelf_fsize(ELF_T_SHDR, ec, eh_version, shnum); in _libelf_resync_elf()
671 align = _libelf_falign(ELF_T_SHDR, ec); in _libelf_resync_elf()
694 _libelf_setphnum(e, ehdr, ec, phnum); in _libelf_resync_elf()
695 _libelf_setshnum(e, ehdr, ec, shnum); in _libelf_resync_elf()
702 if (ec == ELFCLASS32) { in _libelf_resync_elf()
722 int ec, em; in _libelf_write_scn() local
736 if ((ec = e->e_class) == ELFCLASS32) { in _libelf_write_scn()
754 assert(sh_off % _libelf_falign(elftype, ec) == 0); in _libelf_write_scn()
811 if ((msz = _libelf_msize(d->d_type, ec, e->e_version)) == 0) in _libelf_write_scn()
828 fsz = _libelf_fsize(d->d_type, ec, e->e_version, nobjects); in _libelf_write_scn()
833 if (_libelf_xlate(&dst, d, e->e_byteorder, ec, em, ELF_TOFILE) in _libelf_write_scn()
850 int ec, em; in _libelf_write_ehdr() local
858 ec = e->e_class; in _libelf_write_ehdr()
860 ehdr = _libelf_ehdr(e, ec, 0); in _libelf_write_ehdr()
863 fsz = _libelf_fsize(ELF_T_EHDR, ec, e->e_version, (size_t) 1); in _libelf_write_ehdr()
864 if ((msz = _libelf_msize(ELF_T_EHDR, ec, e->e_version)) == 0) in _libelf_write_ehdr()
880 if (_libelf_xlate(&dst, &src, e->e_byteorder, ec, em, ELF_TOFILE) == in _libelf_write_ehdr()
894 int ec, em; in _libelf_write_phdr() local
904 ec = e->e_class; in _libelf_write_phdr()
906 ehdr = _libelf_ehdr(e, ec, 0); in _libelf_write_phdr()
912 if (ec == ELFCLASS32) { in _libelf_write_phdr()
924 assert(phoff % _libelf_falign(ELF_T_PHDR, ec) == 0); in _libelf_write_phdr()
929 if ((msz = _libelf_msize(ELF_T_PHDR, ec, e->e_version)) == 0) in _libelf_write_phdr()
931 fsz = _libelf_fsize(ELF_T_PHDR, ec, e->e_version, phnum); in _libelf_write_phdr()
934 src.d_buf = _libelf_getphdr(e, ec); in _libelf_write_phdr()
942 if (_libelf_xlate(&dst, &src, e->e_byteorder, ec, em, ELF_TOFILE) == in _libelf_write_phdr()
956 int ec, em; in _libelf_write_shdr() local
967 ec = e->e_class; in _libelf_write_shdr()
969 ehdr = _libelf_ehdr(e, ec, 0); in _libelf_write_shdr()
974 if (ec == ELFCLASS32) { in _libelf_write_shdr()
985 assert(shoff % _libelf_falign(ELF_T_SHDR, ec) == 0); in _libelf_write_shdr()
991 if ((msz = _libelf_msize(ELF_T_SHDR, ec, e->e_version)) == 0) in _libelf_write_shdr()
998 fsz = _libelf_fsize(ELF_T_SHDR, ec, e->e_version, (size_t) 1); in _libelf_write_shdr()
1001 if (ec == ELFCLASS32) in _libelf_write_shdr()
1009 if (_libelf_xlate(&dst, &src, e->e_byteorder, ec, em, in _libelf_write_shdr()
1202 int ec; in elf_update() local
1214 if ((ec = e->e_class) != ELFCLASS32 && ec != ELFCLASS64) { in elf_update()