* elf64-ppc.c (allocate_dynrelocs): Likewise.
+2006-02-17 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-ppc.c (allocate_dynrelocs): Tweak undef weak handling.
+ * elf64-ppc.c (allocate_dynrelocs): Likewise.
+
2006-02-17 Alan Modra <amodra@bigpond.net.au>
PR ld/2218
/* Also discard relocs on undefined weak syms with non-default
visibility. */
- if (h->root.type == bfd_link_hash_undefweak)
+ if (eh->dyn_relocs != NULL
+ && h->root.type == bfd_link_hash_undefweak)
{
if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
eh->dyn_relocs = NULL;
/* Also discard relocs on undefined weak syms with non-default
visibility. */
- if (h->root.type == bfd_link_hash_undefweak)
+ if (eh->dyn_relocs != NULL
+ && h->root.type == bfd_link_hash_undefweak)
{
if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
eh->dyn_relocs = NULL;