The "b" flag for COFF sections only unsets the LOAD attribute. It should also clear...
authorJ.W. Jagersma <jwjagersma@gmail.com>
Wed, 25 Mar 2020 11:52:07 +0000 (11:52 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 25 Mar 2020 11:53:12 +0000 (11:53 +0000)
* config/obj-coff.c (obj_coff_section): Set the bss flag on
sections with the "b" attribute.

gas/ChangeLog
gas/config/obj-coff.c

index dcac44c638ea4f361ac687f132305b6cf55e2fe1..fc436ff3c3af7d35104fe72953129bbf22c42b95 100644 (file)
@@ -1,3 +1,8 @@
+2020-03-25  J.W. Jagersma  <jwjagersma@gmail.com>
+
+       * config/obj-coff.c (obj_coff_section): Set the bss flag on
+       sections with the "b" attribute.
+
 2020-03-22  Alan Modra  <amodra@gmail.com>
 
        * testsuite/gas/s12z/truncated.d: Update expected output.
index 178ccaad6a6f90e7b01dec1e476e59f299e9d98c..70d9fb32d5052aa5e11ef2d4c074e90a29bdfa21 100644 (file)
@@ -1532,6 +1532,7 @@ obj_coff_section (int ignore ATTRIBUTE_UNUSED)
   unsigned int exp;
   flagword flags, oldflags;
   asection *sec;
+  bfd_boolean is_bss = FALSE;
 
   if (flag_mri)
     {
@@ -1581,6 +1582,7 @@ obj_coff_section (int ignore ATTRIBUTE_UNUSED)
                  /* Uninitialised data section.  */
                  flags |= SEC_ALLOC;
                  flags &=~ SEC_LOAD;
+                 is_bss = TRUE;
                  break;
 
                case 'n':
@@ -1652,6 +1654,9 @@ obj_coff_section (int ignore ATTRIBUTE_UNUSED)
 
   sec = subseg_new (name, (subsegT) exp);
 
+  if (is_bss)
+    seg_info (sec)->bss = 1;
+
   if (alignment >= 0)
     sec->alignment_power = alignment;
 
This page took 0.025945 seconds and 4 git commands to generate.