From: H.J. Lu Date: Fri, 29 Jun 2012 16:55:15 +0000 (+0000) Subject: Simplify global symbol handling X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6a1b08f5a6670f386c95a21c57068ae1b083e573;p=binutils-gdb.git Simplify global symbol handling * nm.c (filter_symbols): Simplify global symbol handling. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 2448972d69e..35f1bcb3141 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2012-06-29 H.J. Lu + + * nm.c (filter_symbols): Simplify global symbol handling. + 2012-06-29 Francois Gouget PR binutils/14302 diff --git a/binutils/nm.c b/binutils/nm.c index 27019e190c4..ad38e27c8a8 100644 --- a/binutils/nm.c +++ b/binutils/nm.c @@ -435,10 +435,10 @@ filter_symbols (bfd *abfd, bfd_boolean is_dynamic, void *minisyms, if (undefined_only) keep = bfd_is_und_section (sym->section); else if (external_only) - keep = ((sym->flags & BSF_GLOBAL) != 0 - || (sym->flags & BSF_WEAK) != 0 - /* PR binutls/12753: Unique symbols are global too. */ - || (sym->flags & BSF_GNU_UNIQUE) != 0 + /* PR binutls/12753: Unique symbols are global too. */ + keep = ((sym->flags & (BSF_GLOBAL + | BSF_WEAK + | BSF_GNU_UNIQUE)) != 0 || bfd_is_und_section (sym->section) || bfd_is_com_section (sym->section)); else