Lines Matching refs:i_ehdrp

491   Elf_Internal_Ehdr *i_ehdrp;	/* Elf file header, internal form */  in elf_object_p()  local
547 i_ehdrp = elf_elfheader (abfd); in elf_object_p()
548 elf_swap_ehdr_in (abfd, &x_ehdr, i_ehdrp); in elf_object_p()
550 elf_debug_file (i_ehdrp); in elf_object_p()
554 if (i_ehdrp->e_type == ET_CORE) in elf_object_p()
559 if (i_ehdrp->e_shoff == 0 && i_ehdrp->e_type == ET_REL) in elf_object_p()
565 if (i_ehdrp->e_shentsize != sizeof (x_shdr) && i_ehdrp->e_shnum != 0) in elf_object_p()
569 if (i_ehdrp->e_shoff == 0 && i_ehdrp->e_shnum != 0) in elf_object_p()
578 if (ebd->elf_machine_code != i_ehdrp->e_machine in elf_object_p()
580 || i_ehdrp->e_machine != ebd->elf_machine_alt1) in elf_object_p()
582 || i_ehdrp->e_machine != ebd->elf_machine_alt2) in elf_object_p()
586 if (i_ehdrp->e_type == ET_EXEC) in elf_object_p()
588 else if (i_ehdrp->e_type == ET_DYN) in elf_object_p()
591 if (i_ehdrp->e_phnum > 0) in elf_object_p()
602 && i_ehdrp->e_ident[EI_OSABI] != ebd->elf_osabi in elf_object_p()
606 if (i_ehdrp->e_shoff != 0) in elf_object_p()
608 bfd_signed_vma where = i_ehdrp->e_shoff; in elf_object_p()
625 if (i_ehdrp->e_shnum == SHN_UNDEF) in elf_object_p()
627 i_ehdrp->e_shnum = i_shdr.sh_size; in elf_object_p()
628 if (i_ehdrp->e_shnum >= SHN_LORESERVE in elf_object_p()
629 || i_ehdrp->e_shnum != i_shdr.sh_size in elf_object_p()
630 || i_ehdrp->e_shnum == 0) in elf_object_p()
635 if (i_ehdrp->e_shstrndx == (SHN_XINDEX & 0xffff)) in elf_object_p()
637 i_ehdrp->e_shstrndx = i_shdr.sh_link; in elf_object_p()
638 if (i_ehdrp->e_shstrndx != i_shdr.sh_link) in elf_object_p()
643 if (i_ehdrp->e_phnum == PN_XNUM && i_shdr.sh_info != 0) in elf_object_p()
645 i_ehdrp->e_phnum = i_shdr.sh_info; in elf_object_p()
646 if (i_ehdrp->e_phnum != i_shdr.sh_info) in elf_object_p()
652 if (i_ehdrp->e_shnum != 1) in elf_object_p()
655 if (i_ehdrp->e_shnum > (unsigned int) -1 / sizeof (x_shdr) in elf_object_p()
656 || i_ehdrp->e_shnum > (unsigned int) -1 / sizeof (i_shdr)) in elf_object_p()
659 where += (i_ehdrp->e_shnum - 1) * sizeof (x_shdr); in elf_object_p()
662 if ((bfd_size_type) where <= i_ehdrp->e_shoff) in elf_object_p()
671 where = i_ehdrp->e_shoff + sizeof (x_shdr); in elf_object_p()
679 if (i_ehdrp->e_shnum != 0) in elf_object_p()
684 amt = sizeof (*i_shdrp) * i_ehdrp->e_shnum; in elf_object_p()
688 num_sec = i_ehdrp->e_shnum; in elf_object_p()
701 for (shindex = 1; shindex < i_ehdrp->e_shnum; shindex++) in elf_object_p()
749 if (i_ehdrp->e_shnum != 0) in elf_object_p()
751 if (i_ehdrp->e_shstrndx >= elf_numsections (abfd)) in elf_object_p()
759 i_ehdrp->e_shstrndx = SHN_UNDEF; in elf_object_p()
763 else if (i_ehdrp->e_shstrndx != SHN_UNDEF) in elf_object_p()
767 if (i_ehdrp->e_phnum == 0) in elf_object_p()
774 amt = i_ehdrp->e_phnum * sizeof (Elf_Internal_Phdr); in elf_object_p()
778 if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_phoff, SEEK_SET) != 0) in elf_object_p()
781 for (i = 0; i < i_ehdrp->e_phnum; i++, i_phdr++) in elf_object_p()
791 if (i_ehdrp->e_shstrndx != 0 && i_ehdrp->e_shoff != 0) in elf_object_p()
817 bfd_set_start_address (abfd, i_ehdrp->e_entry); in elf_object_p()
988 Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form */ in elf_write_shdrs_and_ehdr() local
994 i_ehdrp = elf_elfheader (abfd); in elf_write_shdrs_and_ehdr()
1000 elf_debug_file (i_ehdrp); in elf_write_shdrs_and_ehdr()
1002 elf_swap_ehdr_out (abfd, i_ehdrp, &x_ehdr); in elf_write_shdrs_and_ehdr()
1010 if (i_ehdrp->e_phnum >= PN_XNUM) in elf_write_shdrs_and_ehdr()
1011 i_shdrp[0]->sh_info = i_ehdrp->e_phnum; in elf_write_shdrs_and_ehdr()
1012 if (i_ehdrp->e_shnum >= (SHN_LORESERVE & 0xffff)) in elf_write_shdrs_and_ehdr()
1013 i_shdrp[0]->sh_size = i_ehdrp->e_shnum; in elf_write_shdrs_and_ehdr()
1014 if (i_ehdrp->e_shstrndx >= (SHN_LORESERVE & 0xffff)) in elf_write_shdrs_and_ehdr()
1015 i_shdrp[0]->sh_link = i_ehdrp->e_shstrndx; in elf_write_shdrs_and_ehdr()
1018 amt = i_ehdrp->e_shnum; in elf_write_shdrs_and_ehdr()
1024 for (count = 0; count < i_ehdrp->e_shnum; i_shdrp++, count++) in elf_write_shdrs_and_ehdr()
1031 if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_shoff, SEEK_SET) != 0 in elf_write_shdrs_and_ehdr()
1045 Elf_Internal_Ehdr *i_ehdrp = elf_elfheader (abfd); in elf_checksum_contents() local
1054 i_ehdr = *i_ehdrp; in elf_checksum_contents()
1060 num = i_ehdrp->e_phnum; in elf_checksum_contents()