aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-01-31 04:13:14 +0000
committerAlan Modra <amodra@gmail.com>2002-01-31 04:13:14 +0000
commite1fa50e7dc1038cbe569532ef6e9388a732d826f (patch)
tree4bf3f3e0b0bed2044027708c6deb2e553ac46787 /bfd/elf64-ppc.c
parentf5a96129d27df3f8e5f057b77b2d6f033843966b (diff)
downloadgdb-e1fa50e7dc1038cbe569532ef6e9388a732d826f.zip
gdb-e1fa50e7dc1038cbe569532ef6e9388a732d826f.tar.gz
gdb-e1fa50e7dc1038cbe569532ef6e9388a732d826f.tar.bz2
* elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
not go via the plt.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 70407e2..3e24e99 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -2536,13 +2536,16 @@ func_desc_adjust (h, inf)
if (fdh->dynindx == -1)
if (! bfd_elf64_link_record_dynamic_symbol (info, fdh))
return false;
- fdh->plt.refcount = h->plt.refcount;
fdh->elf_link_hash_flags |= (h->elf_link_hash_flags
& (ELF_LINK_HASH_REF_REGULAR
| ELF_LINK_HASH_REF_DYNAMIC
| ELF_LINK_HASH_REF_REGULAR_NONWEAK
| ELF_LINK_NON_GOT_REF));
- fdh->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
+ {
+ fdh->plt.refcount = h->plt.refcount;
+ fdh->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ }
((struct ppc_link_hash_entry *) fdh)->is_func_descriptor = 1;
fdh->root.root.string = h->root.root.string + 1;
}
@@ -2553,7 +2556,7 @@ func_desc_adjust (h, inf)
This prevents a shared library from exporting syms that have
been imported from another library. Function code syms that
are really in the library we must leave global to prevent the
- linker dragging a definition in from a static library. */
+ linker dragging in a definition from a static library. */
force_local = (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0;
_bfd_elf_link_hash_hide_symbol (info, h, force_local);
}