Elf_Internal_Shdr *first;
bfd_size_type phdr_size;
{
- Elf_Internal_Phdr phdrs[5];
+ Elf_Internal_Phdr phdrs[10];
unsigned int phdr_count;
Elf_Internal_Phdr *phdr;
int phdr_size_adjust;
Elf_Internal_Ehdr *i_ehdrp;
BFD_ASSERT ((abfd->flags & EXEC_P) != 0);
+ BFD_ASSERT (phdr_size / sizeof (Elf_Internal_Phdr)
+ <= sizeof phdrs / sizeof (phdrs[0]));
phdr_count = 0;
phdr = phdrs;
++phdr_count;
}
- /* Make sure we didn't run off our array. */
- if (phdr_count > sizeof (phdrs) / sizeof (phdr[0]))
- abort ();
-
/* Make sure the return value from get_program_header_size matches
what we computed here. */
if (phdr_count != phdr_size / sizeof (Elf_Internal_Phdr))