Thu Feb 3 16:49:35 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+ * linker.c (_bfd_generic_link_output_symbols,
+ _bfd_generic_link_write_global_symbol): Don't require that all
+ references to a common symbol be themselves common symbols.
+
* aoutx.h (aout_reloc_index_to_section): Handle N_UNDF.
Wed Feb 2 20:37:19 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
case bfd_link_hash_common:
sym->value = h->root.u.c.size;
sym->flags |= BSF_GLOBAL;
+ if (! bfd_is_com_section (sym->section))
+ {
+ BFD_ASSERT (sym->section == &bfd_und_section);
+ sym->section = &bfd_com_section;
+ }
/* We do not set the section of the symbol to
- c.section. c.section is saved so that we know
- where to allocate the symbol if we define it. In
- this case the type is still bfd_link_hash_common,
- so we did not define it, so we do not want to use
- that section. */
- BFD_ASSERT (bfd_is_com_section (sym->section));
+ h->root.u.c.section. That value was saved so
+ that we would know where to allocate the symbol
+ if it was defined. In this case the type is
+ still bfd_link_hash_common, so we did not define
+ it, so we do not want to use that section. */
break;
}
}
break;
case bfd_link_hash_common:
sym->value = h->root.u.c.size;
+ if (! bfd_is_com_section (sym->section))
+ {
+ BFD_ASSERT (sym->section == &bfd_und_section);
+ sym->section = &bfd_com_section;
+ }
/* Do not set the section; see _bfd_generic_link_output_symbols. */
- BFD_ASSERT (bfd_is_com_section (sym->section));
break;
case bfd_link_hash_indirect:
case bfd_link_hash_warning: