aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2006-02-17 12:52:58 +0000
committerAlan Modra <amodra@gmail.com>2006-02-17 12:52:58 +0000
commitcab87ef999efe2137895d35dc933188bd69bad17 (patch)
tree9142909bd1d0e96b4b6fea675f816e843e7fe316 /bfd/elf32-ppc.c
parentdfbb6ac93371afb54c68283d7072f8e001fa01ce (diff)
downloadgdb-cab87ef999efe2137895d35dc933188bd69bad17.zip
gdb-cab87ef999efe2137895d35dc933188bd69bad17.tar.gz
gdb-cab87ef999efe2137895d35dc933188bd69bad17.tar.bz2
* elf32-ppc.c (allocate_dynrelocs): Tweak undef weak handling.
* elf64-ppc.c (allocate_dynrelocs): Likewise.
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r--bfd/elf32-ppc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index caa5ed4..134b960 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -4546,7 +4546,8 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
/* 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;