diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2000-05-30 20:51:36 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2000-05-30 20:51:36 +0000 |
commit | 38048eb91133e21141ab4bb16ef2221852eebc86 (patch) | |
tree | cf4cc83eab920c41a578b59edd38f93c1ad4fa7c /bfd/elflink.h | |
parent | 896ad910163de1066275320baea937053688f1ef (diff) | |
download | gdb-38048eb91133e21141ab4bb16ef2221852eebc86.zip gdb-38048eb91133e21141ab4bb16ef2221852eebc86.tar.gz gdb-38048eb91133e21141ab4bb16ef2221852eebc86.tar.bz2 |
2000-05-30 H.J. Lu <hjl@gnu.org>
* elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
visibility bits if the symbol is undefined. Correctly handle
weak undefined symbols with hidden and internal attributes.
* elflink.h (elf_link_add_object_symbols): Always turn the
symbol into local if it has the hidden or internal attribute.
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r-- | bfd/elflink.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h index f1dab705..d09ad17 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -890,7 +890,6 @@ elf_link_add_object_symbols (abfd, info) Elf_External_Sym *esym; Elf_External_Sym *esymend; struct elf_backend_data *bed; - boolean visibility_changed = false; bed = get_elf_backend_data (abfd); add_symbol_hook = bed->elf_add_symbol_hook; @@ -1581,10 +1580,7 @@ elf_link_add_object_symbols (abfd, info) unsigned char symvis = ELF_ST_VISIBILITY (sym.st_other); if (symvis && (hvis > symvis || hvis == 0)) - { - visibility_changed = true; - h->other = sym.st_other; - } + h->other = sym.st_other; /* If neither has visibility, use the st_other of the definition. This is an arbitrary choice, since the @@ -1855,7 +1851,7 @@ elf_link_add_object_symbols (abfd, info) goto error_return; } } - else if (dynsym && h->dynindx != -1 && visibility_changed) + else if (dynsym && h->dynindx != -1) /* If the symbol already has a dynamic index, but visibility says it should not be visible, turn it into a local symbol. */ |