+2005-06-02 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (add_symbol_adjust): Set sym visibility to most
+ restrictive of func code and func descr for undefined syms as well
+ as defined.
+
2005-05-31 Jim Blandy <jimb@redhat.com>
* Makefile.am: Regenerate dependencies with 'make dep-am'.
else
fdh->elf.ref_regular = 1;
}
- else if (fdh != NULL
- && (fdh->elf.root.type == bfd_link_hash_defined
- || fdh->elf.root.type == bfd_link_hash_defweak))
+ else if (fdh != NULL)
{
unsigned entry_vis = ELF_ST_VISIBILITY (eh->elf.other) - 1;
unsigned descr_vis = ELF_ST_VISIBILITY (fdh->elf.other) - 1;
else if (entry_vis > descr_vis)
eh->elf.other += descr_vis - entry_vis;
- if (eh->elf.root.type == bfd_link_hash_undefined)
+ if ((fdh->elf.root.type == bfd_link_hash_defined
+ || fdh->elf.root.type == bfd_link_hash_defweak)
+ && eh->elf.root.type == bfd_link_hash_undefined)
{
eh->elf.root.type = bfd_link_hash_undefweak;
eh->was_undefined = 1;