diff options
author | Alan Modra <amodra@gmail.com> | 2005-06-02 13:13:54 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2005-06-02 13:13:54 +0000 |
commit | e87d886e78b3a7e73d63f3620cf1d45109066fc5 (patch) | |
tree | 238e72fabc08725f0dfce2d8a031a63ce2bd6e62 /bfd | |
parent | 408082ec1818d43e3552882cea5aa6b09fdc2688 (diff) | |
download | gdb-e87d886e78b3a7e73d63f3620cf1d45109066fc5.zip gdb-e87d886e78b3a7e73d63f3620cf1d45109066fc5.tar.gz gdb-e87d886e78b3a7e73d63f3620cf1d45109066fc5.tar.bz2 |
* 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.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf64-ppc.c | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index cc4031e..a37d99c 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-31 Jim Blandy <jimb@redhat.com> * Makefile.am: Regenerate dependencies with 'make dep-am'. diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 9052a23..04fcdc9 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -4159,9 +4159,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; @@ -4170,7 +4168,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; |