]> Git Repo - binutils.git/blobdiff - bfd/sunos.c
ns532 support from Ian Dall
[binutils.git] / bfd / sunos.c
index 9740cddc927bef7254ffa7178aea7cf98cc72cf0..60a15950c9a03ecb0f5b11db01799b0b86519a32 100644 (file)
@@ -851,11 +851,12 @@ sunos_add_one_symbol (info, abfd, name, flags, section, value, string,
   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
@@ -1513,7 +1514,7 @@ sunos_scan_dynamic_symbol (h, data)
      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
@@ -1695,6 +1696,10 @@ sunos_write_dynamic_symbol (output_bfd, info, harg)
       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
This page took 0.024486 seconds and 4 git commands to generate.