From e47bf6909eaf89f5bac2cc5694cfe75185d0aa5f Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 6 Aug 2009 13:08:24 +0000 Subject: [PATCH] PR binutils/10492 * elf.c (sym_is_global): Return true even for BSF_GNU_UNIQUE symbols. * elf32-mips.c (mips_elf_sym_is_global): Likewise. * elfn32-mips.c (mips_elf_sym_is_global): Likewise. --- bfd/ChangeLog | 9 +++++++++ bfd/elf.c | 2 +- bfd/elf32-mips.c | 2 +- bfd/elfn32-mips.c | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c63bc2f8237..705ee35e1af 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,12 @@ +2009-08-06 Jakub Jelinek + Alan Modra + + PR binutils/10492 + * elf.c (sym_is_global): Return true even for BSF_GNU_UNIQUE + symbols. + * elf32-mips.c (mips_elf_sym_is_global): Likewise. + * elfn32-mips.c (mips_elf_sym_is_global): Likewise. + 2009-08-06 Nathan Sidwell * elf32-arm.c (elf32_arm_size_stubs): Call layout_sections_again diff --git a/bfd/elf.c b/bfd/elf.c index 9863a3a32db..85829ec1958 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -3084,7 +3084,7 @@ sym_is_global (bfd *abfd, asymbol *sym) if (bed->elf_backend_sym_is_global) return (*bed->elf_backend_sym_is_global) (abfd, sym); - return ((sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0 + return ((sym->flags & (BSF_GLOBAL | BSF_WEAK | BSF_GNU_UNIQUE)) != 0 || bfd_is_und_section (bfd_get_section (sym)) || bfd_is_com_section (bfd_get_section (sym))); } diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index ba3ee916ea3..d80778aa911 100644 --- a/bfd/elf32-mips.c +++ b/bfd/elf32-mips.c @@ -1450,7 +1450,7 @@ mips_elf_sym_is_global (bfd *abfd ATTRIBUTE_UNUSED, asymbol *sym) if (SGI_COMPAT (abfd)) return (sym->flags & BSF_SECTION_SYM) == 0; else - return ((sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0 + return ((sym->flags & (BSF_GLOBAL | BSF_WEAK | BSF_GNU_UNIQUE)) != 0 || bfd_is_und_section (bfd_get_section (sym)) || bfd_is_com_section (bfd_get_section (sym))); } diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c index aea3e5af2ae..c1016f3f129 100644 --- a/bfd/elfn32-mips.c +++ b/bfd/elfn32-mips.c @@ -2289,7 +2289,7 @@ mips_elf_sym_is_global (bfd *abfd ATTRIBUTE_UNUSED, asymbol *sym) if (SGI_COMPAT (abfd)) return (sym->flags & BSF_SECTION_SYM) == 0; else - return ((sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0 + return ((sym->flags & (BSF_GLOBAL | BSF_WEAK | BSF_GNU_UNIQUE)) != 0 || bfd_is_und_section (bfd_get_section (sym)) || bfd_is_com_section (bfd_get_section (sym))); } -- 2.30.2