summaryrefslogtreecommitdiffstats
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-01-18 01:22:02 +0000
committerAlan Modra <amodra@gmail.com>2002-01-18 01:22:02 +0000
commit40b8271bdd332388fb95ee6084a13e2177dd060c (patch)
treea32eeac9fd2630ab39c318e828e4373ccdae680d /bfd
parentecace851a68236cf9c355e58ff21deb0a227c5a0 (diff)
downloadppe42-binutils-40b8271bdd332388fb95ee6084a13e2177dd060c.tar.gz
ppe42-binutils-40b8271bdd332388fb95ee6084a13e2177dd060c.zip
* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
dynamic function descriptor symbol, not the associated function symbol.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf64-ppc.c29
2 files changed, 26 insertions, 9 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 067554d3dc..2c738adcdd 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2002-01-18 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
+ dynamic function descriptor symbol, not the associated function
+ symbol.
+
2002-01-17 Eric Christopher <echristo@redhat.com>
* elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 1380e0df26..1e3a28ed3c 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -2384,16 +2384,8 @@ ppc64_elf_adjust_dynamic_symbol (info, h)
if (h->plt.refcount <= 0
|| h->root.root.string[0] != '.'
- || h->root.root.string[1] == '\0'
- || (! info->shared
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0))
+ || h->root.root.string[1] == '\0')
{
- /* This case can occur if we saw a PLT reloc in an input
- file, but the symbol was never referred to by a dynamic
- object, or if all references were garbage collected. In
- such a case, we don't actually need to build a procedure
- linkage table entry. */
h->plt.offset = (bfd_vma) -1;
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
return true;
@@ -2426,6 +2418,25 @@ ppc64_elf_adjust_dynamic_symbol (info, h)
return false;
}
}
+
+ while (fdh->root.type == bfd_link_hash_indirect
+ || fdh->root.type == bfd_link_hash_warning)
+ fdh = (struct elf_link_hash_entry *) fdh->root.u.i.link;
+
+ if (! info->shared
+ && (fdh->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
+ && (fdh->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0)
+ {
+ /* This case can occur if we saw a PLT reloc in an input
+ file, but the symbol was never referred to by a dynamic
+ object, or if all references were garbage collected. In
+ such a case, we don't actually need to build a procedure
+ linkage table entry. */
+ h->plt.offset = (bfd_vma) -1;
+ h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ return true;
+ }
+
return true;
}
else
OpenPOWER on IntegriCloud