* elflink.h (elf_link_output_extsym): Don't output symbols from
[deliverable/binutils-gdb.git] / bfd / sunos.c
index 30fd019a24b2d523ada7d84cff54d1419e0274bb..5fec6f91d7d1dbf75e7a7534ac2d8f408ba2ee60 100644 (file)
@@ -717,13 +717,13 @@ sunos_link_hash_table_create (abfd)
   struct sunos_link_hash_table *ret;
   bfd_size_type amt = sizeof (struct sunos_link_hash_table);
 
-  ret = (struct sunos_link_hash_table *) bfd_alloc (abfd, amt);
+  ret = (struct sunos_link_hash_table *) bfd_malloc (amt);
   if (ret == (struct sunos_link_hash_table *) NULL)
     return (struct bfd_link_hash_table *) NULL;
   if (! NAME(aout,link_hash_table_init) (&ret->root, abfd,
                                         sunos_link_hash_newfunc))
     {
-      bfd_release (abfd, ret);
+      free (ret);
       return (struct bfd_link_hash_table *) NULL;
     }
 
@@ -1434,10 +1434,9 @@ bfd_sunos_size_dynamic_sections (output_bfd, info, sdynptr, sneedptr,
       s = bfd_get_section_by_name (dynobj, ".hash");
       BFD_ASSERT (s != NULL);
       hashalloc = (dynsymcount + bucketcount - 1) * HASH_ENTRY_SIZE;
-      s->contents = (bfd_byte *) bfd_alloc (dynobj, hashalloc);
+      s->contents = (bfd_byte *) bfd_zalloc (dynobj, hashalloc);
       if (s->contents == NULL && dynsymcount > 0)
        return false;
-      memset (s->contents, 0, (size_t) hashalloc);
       for (i = 0; i < bucketcount; i++)
        PUT_WORD (output_bfd, (bfd_vma) -1, s->contents + i * HASH_ENTRY_SIZE);
       s->_raw_size = bucketcount * HASH_ENTRY_SIZE;
@@ -2052,6 +2051,9 @@ sunos_scan_dynamic_symbol (h, data)
 {
   struct bfd_link_info *info = (struct bfd_link_info *) data;
 
+  if (h->root.root.type == bfd_link_hash_warning)
+    h = (struct sunos_link_hash_entry *) h->root.root.u.i.link;
+
   /* Set the written flag for symbols we do not want to write out as
      part of the regular symbol table.  This is all symbols which are
      not defined in a regular object file.  For some reason symbols
This page took 0.023491 seconds and 4 git commands to generate.