/* Linker information. */
struct bfd_link_info *link_info;
- int num_section_syms;
+ unsigned int num_section_syms;
unsigned int shstrtab_section, strtab_section;
/* Segment flags for the PT_GNU_STACK segment. */
/* If called from the assembler, swap_out_syms will have set up
elf_section_syms.
PR 25699: A corrupt input file could contain bogus group info. */
- if (elf_section_syms (abfd) == NULL)
+ if (sec->index >= elf_num_section_syms (abfd)
+ || elf_section_syms (abfd)[sec->index] == NULL)
{
*failedptr = true;
return;
&& asym_ptr->section)
{
asection *sec;
- int indx;
sec = asym_ptr->section;
if (sec->owner != abfd && sec->output_section != NULL)
sec = sec->output_section;
if (sec->owner == abfd
- && (indx = sec->index) < elf_num_section_syms (abfd)
- && elf_section_syms (abfd)[indx] != NULL)
- asym_ptr->udata.i = elf_section_syms (abfd)[indx]->udata.i;
+ && sec->index < elf_num_section_syms (abfd)
+ && elf_section_syms (abfd)[sec->index] != NULL)
+ asym_ptr->udata.i = elf_section_syms (abfd)[sec->index]->udata.i;
}
idx = asym_ptr->udata.i;