Lines Matching refs:i_ehdrp

497   Elf_Internal_Ehdr *i_ehdrp;	/* Elf file header, internal form */
561 i_ehdrp = elf_elfheader (abfd);
562 elf_swap_ehdr_in (abfd, &x_ehdr, i_ehdrp);
564 elf_debug_file (i_ehdrp);
568 if (i_ehdrp->e_type == ET_CORE)
573 if (i_ehdrp->e_shoff == 0 && i_ehdrp->e_type == ET_REL)
579 if (i_ehdrp->e_shentsize != sizeof (x_shdr) && i_ehdrp->e_shnum != 0)
583 if (i_ehdrp->e_shoff == 0 && i_ehdrp->e_shnum != 0)
590 if (ebd->elf_machine_code != i_ehdrp->e_machine
592 || i_ehdrp->e_machine != ebd->elf_machine_alt1)
594 || i_ehdrp->e_machine != ebd->elf_machine_alt2))
608 if (back->elf_machine_code == i_ehdrp->e_machine
610 && back->elf_machine_alt1 == i_ehdrp->e_machine)
612 && back->elf_machine_alt2 == i_ehdrp->e_machine))
621 if (i_ehdrp->e_type == ET_EXEC)
623 else if (i_ehdrp->e_type == ET_DYN)
626 if (i_ehdrp->e_phnum > 0)
637 && i_ehdrp->e_ident[EI_OSABI] != ebd->elf_osabi)
661 if (back->elf_osabi == i_ehdrp->e_ident[EI_OSABI]
662 && (back->elf_machine_code == i_ehdrp->e_machine
664 && back->elf_machine_alt1 == i_ehdrp->e_machine)
666 && back->elf_machine_alt2 == i_ehdrp->e_machine)))
675 if (i_ehdrp->e_shoff != 0)
677 bfd_signed_vma where = i_ehdrp->e_shoff;
694 if (i_ehdrp->e_shnum == SHN_UNDEF)
696 i_ehdrp->e_shnum = i_shdr.sh_size;
697 if (i_ehdrp->e_shnum != i_shdr.sh_size
698 || i_ehdrp->e_shnum == 0)
703 if (i_ehdrp->e_shstrndx == SHN_XINDEX)
705 i_ehdrp->e_shstrndx = i_shdr.sh_link;
706 if (i_ehdrp->e_shstrndx != i_shdr.sh_link)
712 if (i_ehdrp->e_shnum != 1)
715 if (i_ehdrp->e_shnum > (unsigned int) -1 / sizeof (x_shdr)
716 || i_ehdrp->e_shnum > (unsigned int) -1 / sizeof (i_shdr))
719 where += (i_ehdrp->e_shnum - 1) * sizeof (x_shdr);
722 if ((bfd_size_type) where <= i_ehdrp->e_shoff)
731 where = i_ehdrp->e_shoff + sizeof (x_shdr);
739 if (i_ehdrp->e_shnum != 0)
744 amt = sizeof (*i_shdrp) * i_ehdrp->e_shnum;
748 num_sec = i_ehdrp->e_shnum;
772 for (shindex = 1; shindex < i_ehdrp->e_shnum; shindex++)
801 if (i_ehdrp->e_shnum != 0)
803 if (! valid_section_index_p (i_ehdrp->e_shstrndx, elf_numsections (abfd)))
811 i_ehdrp->e_shstrndx = SHN_UNDEF;
815 else if (i_ehdrp->e_shstrndx != SHN_UNDEF)
819 if (i_ehdrp->e_phnum == 0)
826 amt = i_ehdrp->e_phnum * sizeof (Elf_Internal_Phdr);
830 if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_phoff, SEEK_SET) != 0)
833 for (i = 0; i < i_ehdrp->e_phnum; i++, i_phdr++)
843 if (i_ehdrp->e_shstrndx != 0 && i_ehdrp->e_shoff != 0)
873 bfd_set_start_address (abfd, i_ehdrp->e_entry);
1056 Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form */
1062 i_ehdrp = elf_elfheader (abfd);
1068 elf_debug_file (i_ehdrp);
1070 elf_swap_ehdr_out (abfd, i_ehdrp, &x_ehdr);
1078 if (i_ehdrp->e_shnum >= SHN_LORESERVE)
1079 i_shdrp[0]->sh_size = i_ehdrp->e_shnum;
1080 if (i_ehdrp->e_shstrndx >= SHN_LORESERVE)
1081 i_shdrp[0]->sh_link = i_ehdrp->e_shstrndx;
1084 amt = i_ehdrp->e_shnum;
1090 for (count = 0; count < i_ehdrp->e_shnum; i_shdrp++, count++)
1100 if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_shoff, SEEK_SET) != 0