[PATCH] Fix Alpha with gcc 3.1

Jakub Jelinek jakub@redhat.com
Mon Dec 17 14:32:00 GMT 2001


On Mon, Dec 17, 2001 at 01:20:59PM -0500, Daniel Jacobowitz wrote:
> Just checking - is it possible for SHF_MERGE sections to actually be
> discarded?  More specifically, if:
>   elf_section_data (sec)->sec_info_type == ELF_INFO_TYPE_MERGE
> does that mean that we are keeping and actually merging this section
> into an output section?

Yes. If a SHF_MERGE section is going to be discarded for some other reason,
it should end up on:
  if (sec->_raw_size == 0
      || (sec->flags & SEC_EXCLUDE)
      || (sec->flags & SEC_MERGE) == 0
      || sec->entsize == 0) return true;
  if ((sec->flags & SEC_RELOC) != 0) return true;
  if (sec->output_section != NULL
      && bfd_is_abs_section (sec->output_section)) return true;

in merge.c before *psecinfo is initialized (and thus sec_info_type won't be
ELF_INFO_TYPE_MERGE.


	Jakub



More information about the Binutils mailing list