* linker.c (_bfd_link_hash_newfunc): Set all local fields.
authorAlan Modra <amodra@gmail.com>
Thu, 3 Feb 2005 13:54:30 +0000 (13:54 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 3 Feb 2005 13:54:30 +0000 (13:54 +0000)
bfd/ChangeLog
bfd/linker.c

index 21e8a9288b22ebf13e6e6bfe37630422dfe726e4..72eaad8bf78222545e4d11242a67d5581a8c6ff6 100644 (file)
@@ -1,3 +1,7 @@
+2005-02-03  Alan Modra  <amodra@bigpond.net.au>
+
+       * linker.c (_bfd_link_hash_newfunc): Set all local fields.
+
 2005-02-03  Alan Modra  <amodra@bigpond.net.au>
 
        * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
index 5868b955d1379d47a4422ac7733ae05f416fa67e..f940d321bd056b567c979fb553cf60dd517ff3cc 100644 (file)
@@ -455,7 +455,9 @@ _bfd_link_hash_newfunc (struct bfd_hash_entry *entry,
 
       /* Initialize the local fields.  */
       h->type = bfd_link_hash_new;
-      h->u.undef.next = NULL;
+      memset (&h->u.undef.next, 0,
+             (sizeof (struct bfd_link_hash_entry)
+              - offsetof (struct bfd_link_hash_entry, u.undef.next)));
     }
 
   return entry;