Simplify global symbol handling
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 29 Jun 2012 17:36:21 +0000 (17:36 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 29 Jun 2012 17:36:21 +0000 (17:36 +0000)
* archive.c (_bfd_compute_and_write_armap): Simplify global
symbol handling.

bfd/ChangeLog
bfd/archive.c

index 1afd7e42ee00f5d165d4a1f0cd1484c6c7dca4d6..9ea3a1e407eb5702a6874133c80dfb711e466617 100644 (file)
@@ -1,3 +1,8 @@
+2012-06-29  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * archive.c (_bfd_compute_and_write_armap): Simplify global
+       symbol handling.
+
 2012-06-29  Nick Clifton  <nickc@redhat.com>
 
        PR ld/14189
index 26547bada1122005994068c3330b09c2e7d37d39..062045263a1b10f7b8b97394394ff0697af16513 100644 (file)
@@ -2314,10 +2314,10 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
                  flagword flags = (syms[src_count])->flags;
                  asection *sec = syms[src_count]->section;
 
-                 if ((flags & BSF_GLOBAL
-                      || flags & BSF_WEAK
-                      || flags & BSF_INDIRECT
-                      || flags & BSF_GNU_UNIQUE
+                 if (((flags & (BSF_GLOBAL
+                                | BSF_WEAK
+                                | BSF_INDIRECT
+                                | BSF_GNU_UNIQUE)) != 0
                       || bfd_is_com_section (sec))
                      && ! bfd_is_und_section (sec))
                    {