if (hashp != NULL)
*hashp = (struct bfd_link_hash_entry *) h;
- /* Treat a common symbol in a dynamic object as an undefined symbol.
- We don't want to allocate space in .bss for it. */
+ /* Treat a common symbol in a dynamic object as defined in the .bss
+ section of the dynamic object. We don't want to allocate space
+ for it in our process image. */
if ((abfd->flags & DYNAMIC) != 0
&& section == &bfd_com_section)
- section = &bfd_und_section;
+ section = obj_bsssec (abfd);
if (section != &bfd_und_section
&& h->root.root.type != bfd_link_hash_new
which are referenced by a regular object and defined by a dynamic
object do not seem to show up in the regular symbol table. */
if ((h->flags & SUNOS_DEF_REGULAR) == 0)
- h->root.root.written = true;
+ h->root.written = true;
/* If this symbol is defined by a dynamic object and referenced by a
regular object, see whether we gave it a reasonable value while
type = N_UNDF | N_EXT;
val = h->root.root.u.c.size;
break;
+ case bfd_link_hash_weak:
+ type = N_WEAKU;
+ val = 0;
+ break;
case bfd_link_hash_indirect:
case bfd_link_hash_warning:
/* FIXME: Ignore these for now. The circumstances under which