Lines Matching defs:i_ehdrp
523 Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form */
578 i_ehdrp = elf_elfheader (abfd);
579 elf_swap_ehdr_in (abfd, &x_ehdr, i_ehdrp);
581 elf_debug_file (i_ehdrp);
585 if (i_ehdrp->e_type == ET_CORE)
590 if (i_ehdrp->e_shoff < sizeof (x_ehdr) && i_ehdrp->e_type == ET_REL)
596 if (i_ehdrp->e_shentsize != sizeof (x_shdr) && i_ehdrp->e_shnum != 0)
600 if (i_ehdrp->e_shoff < sizeof (x_ehdr) && i_ehdrp->e_shnum != 0)
609 if (ebd->elf_machine_code != i_ehdrp->e_machine
611 || i_ehdrp->e_machine != ebd->elf_machine_alt1)
613 || i_ehdrp->e_machine != ebd->elf_machine_alt2)
617 if (i_ehdrp->e_type == ET_EXEC)
619 else if (i_ehdrp->e_type == ET_DYN)
622 if (i_ehdrp->e_phnum > 0)
633 && i_ehdrp->e_ident[EI_OSABI] != ebd->elf_osabi
637 if (i_ehdrp->e_shoff >= sizeof (x_ehdr))
639 file_ptr where = (file_ptr) i_ehdrp->e_shoff;
653 if (i_ehdrp->e_shnum == SHN_UNDEF)
655 i_ehdrp->e_shnum = i_shdr.sh_size;
656 if (i_ehdrp->e_shnum >= SHN_LORESERVE
657 || i_ehdrp->e_shnum != i_shdr.sh_size
658 || i_ehdrp->e_shnum == 0)
663 if (i_ehdrp->e_shstrndx == (SHN_XINDEX & 0xffff))
665 i_ehdrp->e_shstrndx = i_shdr.sh_link;
666 if (i_ehdrp->e_shstrndx != i_shdr.sh_link)
671 if (i_ehdrp->e_phnum == PN_XNUM && i_shdr.sh_info != 0)
673 i_ehdrp->e_phnum = i_shdr.sh_info;
674 if (i_ehdrp->e_phnum != i_shdr.sh_info)
680 if (i_ehdrp->e_shnum != 1)
683 if (i_ehdrp->e_shnum > (unsigned int) -1 / sizeof (x_shdr)
684 || i_ehdrp->e_shnum > (unsigned int) -1 / sizeof (i_shdr))
687 where += (i_ehdrp->e_shnum - 1) * sizeof (x_shdr);
688 if ((bfd_size_type) where <= i_ehdrp->e_shoff)
697 where = i_ehdrp->e_shoff + sizeof (x_shdr);
705 if (i_ehdrp->e_shnum != 0)
711 if (_bfd_mul_overflow (i_ehdrp->e_shnum, sizeof (*i_shdrp), &amt))
716 num_sec = i_ehdrp->e_shnum;
733 for (shindex = 1; shindex < i_ehdrp->e_shnum; shindex++)
779 if (i_ehdrp->e_shstrndx >= elf_numsections (abfd)
780 || i_shdrp[i_ehdrp->e_shstrndx].sh_type != SHT_STRTAB)
788 i_ehdrp->e_shstrndx = SHN_UNDEF;
797 else if (i_ehdrp->e_shstrndx != SHN_UNDEF)
801 if (i_ehdrp->e_phnum == 0)
814 && i_ehdrp->e_phnum > filesize / sizeof (Elf_External_Phdr))
816 if (_bfd_mul_overflow (i_ehdrp->e_phnum, sizeof (*i_phdr), &amt))
822 if (bfd_seek (abfd, i_ehdrp->e_phoff, SEEK_SET) != 0)
826 for (i = 0; i < i_ehdrp->e_phnum; i++, i_phdr++)
853 && i_ehdrp->e_shoff == 0
854 && i_ehdrp->e_shstrndx == 0)
859 for (i = 0; i < i_ehdrp->e_phnum; i++, i_phdr++)
865 i_ehdrp->e_phnum,
873 if (i_ehdrp->e_shstrndx != 0 && i_ehdrp->e_shoff >= sizeof (x_ehdr))
899 bfd_set_start_address (abfd, i_ehdrp->e_entry);
1108 Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form */
1114 i_ehdrp = elf_elfheader (abfd);
1120 elf_debug_file (i_ehdrp);
1122 elf_swap_ehdr_out (abfd, i_ehdrp, &x_ehdr);
1133 if (i_ehdrp->e_phnum >= PN_XNUM)
1134 i_shdrp[0]->sh_info = i_ehdrp->e_phnum;
1135 if (i_ehdrp->e_shnum >= (SHN_LORESERVE & 0xffff))
1136 i_shdrp[0]->sh_size = i_ehdrp->e_shnum;
1137 if (i_ehdrp->e_shstrndx >= (SHN_LORESERVE & 0xffff))
1138 i_shdrp[0]->sh_link = i_ehdrp->e_shstrndx;
1141 if (_bfd_mul_overflow (i_ehdrp->e_shnum, sizeof (*x_shdrp), &amt))
1150 for (count = 0; count < i_ehdrp->e_shnum; i_shdrp++, count++)
1157 amt = (bfd_size_type) i_ehdrp->e_shnum * sizeof (*x_shdrp);
1158 if (bfd_seek (abfd, i_ehdrp->e_shoff, SEEK_SET) != 0
1172 Elf_Internal_Ehdr *i_ehdrp = elf_elfheader (abfd);
1181 i_ehdr = *i_ehdrp;
1187 num = i_ehdrp->e_phnum;