bfd/merge.c puts in quite some effort to track mergable sections. That's
all wasted for sections which don't have contents, as for them
_bfd_write_merged_section() will never be called.
With the combination not having any useful effect, also warn about this
in gas.
if (sec->size == 0
|| (sec->flags & SEC_EXCLUDE) != 0
+ || (sec->flags & SEC_HAS_CONTENTS) == 0
|| sec->entsize == 0)
return true;
attr &= ~SHF_MERGE;
}
+ if ((attr & SHF_MERGE) != 0 && type == SHT_NOBITS)
+ as_warn (_("bogus SHF_MERGE for SHT_NOBITS section"));
+
if ((attr & SHF_LINK_ORDER) != 0 && *input_line_pointer == ',')
{
++input_line_pointer;