Lines 640-645
Link Here
|
640 |
Elf_Internal_Shdr *shdrp; |
640 |
Elf_Internal_Shdr *shdrp; |
641 |
unsigned int num_sec; |
641 |
unsigned int num_sec; |
642 |
|
642 |
|
|
|
643 |
if (sizeof(*i_shdrp)*i_ehdrp->e_shnum/sizeof(*i_shdrp)!=i_ehdrp->e_shnum) |
644 |
goto got_no_match; |
645 |
|
643 |
amt = sizeof (*i_shdrp) * i_ehdrp->e_shnum; |
646 |
amt = sizeof (*i_shdrp) * i_ehdrp->e_shnum; |
644 |
i_shdrp = bfd_alloc (abfd, amt); |
647 |
i_shdrp = bfd_alloc (abfd, amt); |
645 |
if (!i_shdrp) |
648 |
if (!i_shdrp) |
Lines 647-652
Link Here
|
647 |
num_sec = i_ehdrp->e_shnum; |
650 |
num_sec = i_ehdrp->e_shnum; |
648 |
if (num_sec > SHN_LORESERVE) |
651 |
if (num_sec > SHN_LORESERVE) |
649 |
num_sec += SHN_HIRESERVE + 1 - SHN_LORESERVE; |
652 |
num_sec += SHN_HIRESERVE + 1 - SHN_LORESERVE; |
|
|
653 |
|
654 |
if (sizeof (i_shdrp) * num_sec/sizeof (i_shdrp) != num_sec) |
655 |
goto got_no_match; |
656 |
|
650 |
elf_numsections (abfd) = num_sec; |
657 |
elf_numsections (abfd) = num_sec; |
651 |
amt = sizeof (i_shdrp) * num_sec; |
658 |
amt = sizeof (i_shdrp) * num_sec; |
652 |
elf_elfsections (abfd) = bfd_alloc (abfd, amt); |
659 |
elf_elfsections (abfd) = bfd_alloc (abfd, amt); |