From 38048eb91133e21141ab4bb16ef2221852eebc86 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 30 May 2000 20:51:36 +0000 Subject: 2000-05-30 H.J. Lu * 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. --- bfd/elflink.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'bfd/elflink.c') diff --git a/bfd/elflink.c b/bfd/elflink.c index 1b1548a..c593e49 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -235,10 +235,16 @@ _bfd_elf_link_record_dynamic_symbol (info, h) (*info->callbacks->undefined_symbol) (info, name, abfd, bfd_und_section_ptr, 0, true); + + /* We have flaged a fatal error. We now treat this as + a normal symbol to avoid further error messages. */ + h->other ^= ELF_ST_VISIBILITY (h->other); + } + else if (h->root.type != bfd_link_hash_undefweak) + { + h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL; + return true; } - - h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL; - return true; default: break; -- cgit v1.1