* linker.c (_bfd_link_hash_newfunc): Set all local fields.

This commit is contained in:
Alan Modra 2005-02-03 13:54:30 +00:00
parent 464dd14d58
commit 10d86c8a5c
2 changed files with 7 additions and 1 deletions

View 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.

View 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;