summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2005-06-03 01:52:29 +0000
committerAlan Modra <amodra@bigpond.net.au>2005-06-03 01:52:29 +0000
commit1b1c16fbb6e6f6afd6e8520a977a967e014fad8e (patch)
tree861cd24b950f4aa095d1719aa9ec83eaee692b96
parent63fdcc71ac9787c92c21806b3d9d302f3f432e0d (diff)
downloadgdb-1b1c16fbb6e6f6afd6e8520a977a967e014fad8e.tar.gz
* 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.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf64-ppc.c8
2 files changed, 10 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 718b8bf831c..bd81db1f8a5 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+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-29 Daniel Jacobowitz <dan@codesourcery.com>
Backport from mainline:
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 69afd3a65f7..70219b5436a 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -4111,9 +4111,7 @@ add_symbol_adjust (struct elf_link_hash_entry *h, void *inf)
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;
@@ -4122,7 +4120,9 @@ add_symbol_adjust (struct elf_link_hash_entry *h, void *inf)
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;