When adding BSF_WEAK flag, OR it in rather than replacing previously selected
authorNick Clifton <nickc@redhat.com>
Thu, 14 Mar 2002 18:30:40 +0000 (18:30 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 14 Mar 2002 18:30:40 +0000 (18:30 +0000)
flags.

bfd/ChangeLog
bfd/coffcode.h

index ff33b4897319256084f8b1058f5d74cbf14a1c1d..54bfc039a3063ac4ad501700aa68667acd59deb0 100644 (file)
@@ -1,5 +1,8 @@
 2002-03-14  Nick Clifton  <nickc@cambridge.redhat.com>
 
+       * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
+       OR it in rather than replacing previously selected flags.
+
        * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
        (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
 
index f0a2c5e3a6195876fecfb13cb222498ec5e3a78e..f87cb9e98ce00feba93e286443e308699e4b6ad9 100644 (file)
@@ -4443,16 +4443,14 @@ coff_slurp_symbol_table (abfd)
 
 #ifdef COFF_WITH_PE
              if (src->u.syment.n_sclass == C_NT_WEAK)
-               dst->symbol.flags = BSF_WEAK;
+               dst->symbol.flags |= BSF_WEAK;
+
              if (src->u.syment.n_sclass == C_SECTION
                  && src->u.syment.n_scnum > 0)
-               {
                  dst->symbol.flags = BSF_LOCAL;
-               }
 #endif
-
              if (src->u.syment.n_sclass == C_WEAKEXT)
-               dst->symbol.flags = BSF_WEAK;
+               dst->symbol.flags |= BSF_WEAK;
 
              break;