summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2008-12-11 10:14:40 +0000
committerAlan Modra <amodra@bigpond.net.au>2008-12-11 10:14:40 +0000
commit567d8ba06f0900059f9771143946fa868a3c1d61 (patch)
tree25da8cbfa7b6030edc7bd9ddd7f80d4bb933e8df
parent8249c18481c59b7caf6c9b50d9d3787bf85a5760 (diff)
downloadbinutils-redhat-567d8ba06f0900059f9771143946fa868a3c1d61.tar.gz
PR 7041
* elf64-ppc.c (func_desc_adjust): Correct logic making fake function descriptors. Similarly correct making function descriptors dynamic.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf64-ppc.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 704a418843..9bb846df58 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2008-12-11 Alan Modra <amodra@bigpond.net.au>
+
+ PR 7041
+ * elf64-ppc.c (func_desc_adjust): Correct logic making fake function
+ descriptors. Similarly correct making function descriptors dynamic.
+
2008-12-10 Alan Modra <amodra@bigpond.net.au>
* elf32-spu.h (struct spu_elf_params): Add num_regions.
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index c4be65a79a..02a863250b 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -5815,7 +5815,7 @@ func_desc_adjust (struct elf_link_hash_entry *h, void *inf)
fdh = (struct ppc_link_hash_entry *) fdh->elf.root.u.i.link;
if (fdh == NULL
- && info->shared
+ && !info->executable
&& (fh->elf.root.type == bfd_link_hash_undefined
|| fh->elf.root.type == bfd_link_hash_undefweak))
{
@@ -5848,7 +5848,7 @@ func_desc_adjust (struct elf_link_hash_entry *h, void *inf)
if (fdh != NULL
&& !fdh->elf.forced_local
- && (info->shared
+ && (!info->executable
|| fdh->elf.def_dynamic
|| fdh->elf.ref_dynamic
|| (fdh->elf.root.type == bfd_link_hash_undefweak