diff options
author | Alan Modra <amodra@gmail.com> | 2006-02-17 12:52:58 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2006-02-17 12:52:58 +0000 |
commit | cab87ef999efe2137895d35dc933188bd69bad17 (patch) | |
tree | 9142909bd1d0e96b4b6fea675f816e843e7fe316 | |
parent | dfbb6ac93371afb54c68283d7072f8e001fa01ce (diff) | |
download | ppe42-binutils-cab87ef999efe2137895d35dc933188bd69bad17.tar.gz ppe42-binutils-cab87ef999efe2137895d35dc933188bd69bad17.zip |
* elf32-ppc.c (allocate_dynrelocs): Tweak undef weak handling.
* elf64-ppc.c (allocate_dynrelocs): Likewise.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-ppc.c | 3 | ||||
-rw-r--r-- | bfd/elf64-ppc.c | 3 |
3 files changed, 9 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 3f4da9cfa8..6162d9cb5f 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 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 * elf64-ppc.c (allocate_dynrelocs): Ensure undef weak sym is dynamic. diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index caa5ed44d9..134b960db9 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; diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 785c859de0..1cfac82c74 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -7582,7 +7582,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; |