* linker.c (generic_link_add_symbol_list): If symbol is common,
authorIan Lance Taylor <ian@airs.com>
Thu, 27 Jan 1994 18:56:42 +0000 (18:56 +0000)
committerIan Lance Taylor <ian@airs.com>
Thu, 27 Jan 1994 18:56:42 +0000 (18:56 +0000)
set the BSF_OLD_COMMON flag.

bfd/ChangeLog
bfd/linker.c

index 13ff5f479b39210e2fa0378f7319320b2aa330ea..0e4ef7ee626c1dcdaaa0b22cc47b972ba0fb43ce 100644 (file)
@@ -1,3 +1,8 @@
+Thu Jan 27 13:54:08 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * linker.c (generic_link_add_symbol_list): If symbol is common,
+       set the BSF_OLD_COMMON flag.
+
 Wed Jan 26 13:47:15 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
 
        * format.c (bfd_check_format_matches): Put the new entry in the
index 2f3ac82aad2756e709ccfa78324fddb31ab63bf4..f70f799437509e346cf59a5b44f7a04c18dadaba 100644 (file)
@@ -1066,7 +1066,14 @@ generic_link_add_symbol_list (abfd, info, symbol_count, symbols)
                  || (bfd_get_section (p) != &bfd_und_section
                      && (! bfd_is_com_section (bfd_get_section (p))
                          || (bfd_get_section (h->sym) == &bfd_und_section))))
-               h->sym = p;
+               {
+                 h->sym = p;
+                 /* BSF_OLD_COMMON is a hack to support COFF reloc
+                    reading, and it should go away when the COFF
+                    linker is switched to the new version.  */
+                 if (bfd_is_com_section (bfd_get_section (p)))
+                   p->flags |= BSF_OLD_COMMON;
+               }
            }
        }
     }