From 92ccf429e9ab84fe618ff9a97624bb78676d92bd Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 3 Feb 2005 13:54:30 +0000 Subject: [PATCH] * linker.c (_bfd_link_hash_newfunc): Set all local fields. --- bfd/ChangeLog | 4 ++++ bfd/linker.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 21e8a9288b..72eaad8bf7 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,9 @@ 2005-02-03 Alan Modra + * linker.c (_bfd_link_hash_newfunc): Set all local fields. + +2005-02-03 Alan Modra + * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak. * elflink.c (elf_smash_syms): Restore symbols that were undefweak before the as-needed lib was loaded. Abort on unexpected refs. diff --git a/bfd/linker.c b/bfd/linker.c index 5868b955d1..f940d321bd 100644 --- a/bfd/linker.c +++ b/bfd/linker.c @@ -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; -- 2.11.0