Simplify global symbol handling
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 29 Jun 2012 16:55:15 +0000 (16:55 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 29 Jun 2012 16:55:15 +0000 (16:55 +0000)
* nm.c (filter_symbols): Simplify global symbol handling.

binutils/ChangeLog
binutils/nm.c

index 2448972d69e6da2004008cca19045382111ce62c..35f1bcb3141e347260da952484657c27de3f9160 100644 (file)
@@ -1,3 +1,7 @@
+2012-06-29  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * nm.c (filter_symbols): Simplify global symbol handling.
+
 2012-06-29  Francois Gouget  <fgouget@codeweavers.com>
 
        PR binutils/14302
index 27019e190c4933751cdc0efe85ab83a234135d8c..ad38e27c8a834d5ee06e8c0024af959726e9cbdb 100644 (file)
@@ -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