* read.c (s_comm_internal): Set bfd_com_section segment.
authorAlan Modra <amodra@gmail.com>
Tue, 15 Nov 2005 22:58:38 +0000 (22:58 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 15 Nov 2005 22:58:38 +0000 (22:58 +0000)
(s_mri_common): Likewise.
* write.c (write_object_file): Remove non-BFD assembler common
sym handling.

gas/ChangeLog
gas/read.c
gas/write.c

index 6a2e5cb003c1739f270a4a4c937263757bd8dc7a..1ef760e775be4b1deca44ba49557275590883ff7 100644 (file)
@@ -1,3 +1,10 @@
+2005-11-16  Alan Modra  <amodra@bigpond.net.au>
+
+       * read.c (s_comm_internal): Set bfd_com_section segment.
+       (s_mri_common): Likewise.
+       * write.c (write_object_file): Remove non-BFD assembler common
+       sym handling.
+
 2005-11-15  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * config/tc-arm.c (s_arm_unwind_save_core): Don't emit an extra
index bf9346edae521ff37a288988d09cc3fd4638a7a1..a398e526767ff6da037f8aeb2a17c4177585380b 100644 (file)
@@ -1490,6 +1490,7 @@ s_comm_internal (int param,
     {
       S_SET_VALUE (symbolP, (valueT) size);
       S_SET_EXTERNAL (symbolP);
+      S_SET_SEGMENT (symbolP, bfd_com_section_ptr);
 #ifdef OBJ_VMS
       {
        extern int flag_one;
@@ -1583,6 +1584,7 @@ s_mri_common (int small ATTRIBUTE_UNUSED)
     }
 
   S_SET_EXTERNAL (sym);
+  S_SET_SEGMENT (sym, bfd_com_section_ptr);
   mri_common_symbol = sym;
 
 #ifdef S_SET_ALIGN
index 06133679b54df38a4e0a3edd08e6252c9e8cc1ca..f86930b45410d7282f7f48de93d91a4c8513dcf2 100644 (file)
@@ -1493,12 +1493,6 @@ write_object_file (void)
              continue;
            }
 
-         /* So far, common symbols have been treated like undefined symbols.
-            Put them in the common section now.  */
-         if (S_IS_DEFINED (symp) == 0
-             && S_GET_VALUE (symp) != 0)
-           S_SET_SEGMENT (symp, bfd_com_section_ptr);
-
 #ifdef obj_frob_symbol
          obj_frob_symbol (symp, punt);
 #endif