summaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2002-05-24 04:07:38 +0000
committerAlan Modra <amodra@bigpond.net.au>2002-05-24 04:07:38 +0000
commita5f2cc7236201f616e2805fa94841389b1968823 (patch)
tree9568b7bf3f0eee44ba5064732861548129cc3f8a /bfd/elf64-ppc.c
parentddcf9c627314f1c8565192da31a803cac116043e (diff)
downloadgdb-a5f2cc7236201f616e2805fa94841389b1968823.tar.gz
* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
and is_func_descriptor. (func_desc_adjust): Hide function code sym in shared libs unless there is a matching exported function descriptor sym.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index d027d811599..377548203a8 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -2583,8 +2583,11 @@ ppc64_elf_copy_indirect_symbol (dir, ind)
eind->dyn_relocs = NULL;
}
- edir->is_func |= eind->is_func;
- edir->is_func_descriptor |= eind->is_func_descriptor;
+ /* We don't need to copy is_func and is_func_descriptor; They're
+ never set when copy_indirect_symbol is called for indirect
+ symbols at the add_symbols stage of linking, and they're not
+ relevant when copy_indirect_symbol is called for weakdefs.
+ weakdefs are only held for non-function syms. */
_bfd_elf_link_hash_copy_indirect (dir, ind);
}
@@ -3236,8 +3239,14 @@ func_desc_adjust (h, inf)
been imported from another library. Function code syms that
are really in the library we must leave global to prevent the
linker dragging in a definition from a static library. */
- force_local = ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
- && info->shared);
+ force_local = (info->shared
+ && ((h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0
+ || fdh == NULL
+ || (fdh->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0
+ || (fdh->elf_link_hash_flags
+ & ELF_LINK_FORCED_LOCAL) != 0));
_bfd_elf_link_hash_hide_symbol (info, h, force_local);
}