Rewrite SHT_GROUP handling

This patch delays setting up elf_next_in_group, elf_sec_group and
elf_group_name when reading ELF object files until after all ELF
sections have been processed by bfd_section_from_shdr.  This is simpler
and more robust than the current scheme of driving the whole process
on detecting a section with SHF_GROUP set.

	* elf-bfd.h (struct elf_obj_tdata): Delete group_sect_ptr,
	num_group and group_search_offset.
	* elf.c (Elf_Internal_Group): Delete.
	(setup_group): Delete function.
	(IS_VALID_GROUP_SECTION_HEADER): Delete macro.
	(is_valid_group_section_header),
	(process_sht_group_entries): New functions.
	(_bfd_elf_setup_sections): Handle group sections here..
	(_bfd_elf_make_section_from_shdr): ..rather than here.
	(bfd_section_from_shdr): Don't check SHT_GROUP validity here.
2 files changed