mmix-mmo set SEC_DATA for .data section
authorAlan Modra <amodra@gmail.com>
Thu, 27 Feb 2020 05:56:19 +0000 (16:26 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 27 Feb 2020 21:49:42 +0000 (08:19 +1030)
With the bfd_decode_symclass change, ld SIZEOF test fails due to
data_end being reported as type '?'.

bfd/
PR 24511
* mmo.c (mmo_scan): Set SEC_DATA for .data.
ld/
PR 24511
* testsuite/ld-mmix/b-fixo2.d: Adjust for .data change.
* testsuite/ld-mmix/sec-2.d: Likewise.
* testsuite/ld-mmix/sec-3.d: Likewise.
* testsuite/ld-mmix/sec-4.d: Likewise.
* testsuite/ld-mmix/spec802.d: Likewise.
* testsuite/ld-mmix/spec803.d: Likewise.
* testsuite/ld-mmix/spec804.d: Likewise.
* testsuite/ld-mmix/spec805.d: Likewise.
* testsuite/ld-mmix/spec806.d: Likewise.
* testsuite/ld-mmix/spec807.d: Likewise.
* testsuite/ld-mmix/spec808.d: Likewise.

14 files changed:
bfd/ChangeLog
bfd/mmo.c
ld/ChangeLog
ld/testsuite/ld-mmix/b-fixo2.d
ld/testsuite/ld-mmix/sec-2.d
ld/testsuite/ld-mmix/sec-3.d
ld/testsuite/ld-mmix/sec-4.d
ld/testsuite/ld-mmix/spec802.d
ld/testsuite/ld-mmix/spec803.d
ld/testsuite/ld-mmix/spec804.d
ld/testsuite/ld-mmix/spec805.d
ld/testsuite/ld-mmix/spec806.d
ld/testsuite/ld-mmix/spec807.d
ld/testsuite/ld-mmix/spec808.d

index 6b267094320bcbd2c0976d563a58714942ed27a4..b300326b0fccea981d9736a9e27a3e8b511c20ad 100644 (file)
@@ -1,3 +1,8 @@
+2020-02-27  Alan Modra  <amodra@gmail.com>
+
+       PR 24511
+       * mmo.c (mmo_scan): Set SEC_DATA for .data.
+
 2020-02-27  Alan Modra  <amodra@gmail.com>
 
        PR 24511
index 9ac689d0424acf55df24689a7c1ed1a78804b428..073c37c0acdcb6916e53ea46ed0425f72a1f0fdf 100644 (file)
--- a/bfd/mmo.c
+++ b/bfd/mmo.c
@@ -2074,7 +2074,7 @@ mmo_scan (bfd *abfd)
   if (sec != NULL
       && (bfd_section_flags (sec) & SEC_HAS_CONTENTS)
       && !bfd_set_section_flags (sec, (bfd_section_flags (sec)
-                                      | SEC_ALLOC | SEC_LOAD)))
+                                      | SEC_ALLOC | SEC_LOAD | SEC_DATA)))
     error = TRUE;
 
   /* Free whatever resources we took.  */
index 56e84c13d27c04893b45c03b11eb4c46e38cae64..118b5c57e1fe11ec88f877b521c63fbc93bafc7d 100644 (file)
@@ -1,3 +1,18 @@
+2020-02-27  Alan Modra  <amodra@gmail.com>
+
+       PR 24511
+       * testsuite/ld-mmix/b-fixo2.d: Adjust for .data change.
+       * testsuite/ld-mmix/sec-2.d: Likewise.
+       * testsuite/ld-mmix/sec-3.d: Likewise.
+       * testsuite/ld-mmix/sec-4.d: Likewise.
+       * testsuite/ld-mmix/spec802.d: Likewise.
+       * testsuite/ld-mmix/spec803.d: Likewise.
+       * testsuite/ld-mmix/spec804.d: Likewise.
+       * testsuite/ld-mmix/spec805.d: Likewise.
+       * testsuite/ld-mmix/spec806.d: Likewise.
+       * testsuite/ld-mmix/spec807.d: Likewise.
+       * testsuite/ld-mmix/spec808.d: Likewise.
+
 2020-02-26  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/25593
index e8e2ff845fad7472de54ec0f56a0c31e40406ab7..3db01eb32dafef2ff7bb5969b31387bf86705839 100644 (file)
@@ -16,7 +16,7 @@ Idx Name          Size      VMA               LMA               File off  Algn
   0 \.text         0+8  0+  0+  0+  2\*\*2
                   CONTENTS, ALLOC, LOAD, CODE
   1 \.data         0+4  2068098510aa5564  2068098510aa5564  0+  2\*\*2
-                  CONTENTS, ALLOC, LOAD
+                  CONTENTS, ALLOC, LOAD, DATA
 SYMBOL TABLE:
 0+4 g       \.text Main
 0+4 g       \.text a
index 10623f354c9d75a9eff5fea1fe6d9b201dbb8784..10a9a521ac31a63e2eecae9e344ba6632e967102 100644 (file)
@@ -13,7 +13,7 @@ Idx Name          Size      VMA               LMA               File off  Algn
   1 \.other        0+50  1000000000000000  1000000000000000  0+  2\*\*2
                   CONTENTS, ALLOC, LOAD, CODE, DATA
   2 \.data         0+4  2000000000000004  2000000000000004  0+  2\*\*2
-                  CONTENTS, ALLOC, LOAD
+                  CONTENTS, ALLOC, LOAD, DATA
 Contents of section \.text:
  0100 e3fd0001                             .*
 Contents of section \.other:
index 290052b99ebd2fc26d9788b35f91957f0fbb9ec3..8074e834e1e3631a36612416820b85493e81f257 100644 (file)
@@ -15,7 +15,7 @@ Idx Name          Size      VMA               LMA               File off  Algn
   2 \.a\.fourth\.section 0+10  0+20  0+20  0+  2\*\*2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   3 \.data         0+4  2000000000000004  2000000000000004  0+  2\*\*2
-                  CONTENTS, ALLOC, LOAD
+                  CONTENTS, ALLOC, LOAD, DATA
   4 anothersec    0+13  2000000000000008  2000000000000008  0+  2\*\*2
                   CONTENTS, ALLOC, LOAD, DATA
   5 thirdsec      0+a  0+  0+  0+  2\*\*2
index 251f6a28d0b56947ba755addc3cabf6c5d756a1c..16b65896a76e44704e0bfc051a7f2756371fafb6 100644 (file)
@@ -11,7 +11,7 @@ Idx Name          Size      VMA               LMA               File off  Algn
   0 \.text         0+4  0+100  0+100  0+  2\*\*2
                   CONTENTS, ALLOC, LOAD, CODE
   1 \.data         0+4  2000000000000004  2000000000000004  0+  2\*\*2
-                  CONTENTS, ALLOC, LOAD
+                  CONTENTS, ALLOC, LOAD, DATA
   2 \.other        0+c  1000000000000000  1000000000000000  0+  2\*\*2
                   CONTENTS, ALLOC, LOAD, READONLY, CODE
 Contents of section \.text:
index ea0ebc3d656d37f1a94a27e628588a9384745793..cea7de2ee589077087a741440c09e2725ecd4614 100644 (file)
@@ -13,7 +13,7 @@ Idx Name          Size      VMA               LMA               File off  Algn
   0 \.text         0+4  0+  0+  0+  2\*\*2
                   CONTENTS, ALLOC, LOAD, CODE
   1 \.data         0+4  2000000000000000  2000000000000000  0+  2\*\*2
-                  CONTENTS, ALLOC, LOAD
+                  CONTENTS, ALLOC, LOAD, DATA
   2 \.MMIX\.spec_data\.80 0+4  0+  0+  0+  2\*\*2
                   CONTENTS
 Contents of section \.text:
index b933d6ca7df8e2110985ec226b92df6cb62ec0bb..cc63844425d06bee073b2c1cb56cbb158bb3128f 100644 (file)
@@ -13,7 +13,7 @@ Idx Name          Size      VMA               LMA               File off  Algn
   0 \.text         0+4  0+  0+  0+  2\*\*2
                   CONTENTS, ALLOC, LOAD, CODE
   1 \.data         0+4  2000000000000000  2000000000000000  0+  2\*\*2
-                  CONTENTS, ALLOC, LOAD
+                  CONTENTS, ALLOC, LOAD, DATA
   2 \.MMIX\.spec_data\.80 0+c  0+  0+  0+  2\*\*2
                   CONTENTS
 Contents of section \.text:
index 170bc5e0bd71c8689f727a5312d1b3092c43d756..fd8f0bf376d6ded0f2d16b01a52e45ba929dbf55 100644 (file)
@@ -13,7 +13,7 @@ Idx Name          Size      VMA               LMA               File off  Algn
   0 \.text         0+4  0+  0+  0+  2\*\*2
                   CONTENTS, ALLOC, LOAD, CODE
   1 \.data         0+4  2000000000000000  2000000000000000  0+  2\*\*2
-                  CONTENTS, ALLOC, LOAD
+                  CONTENTS, ALLOC, LOAD, DATA
   2 \.MMIX\.spec_data\.80 0+10  0+  0+  0+  2\*\*2
                   CONTENTS
 Contents of section \.text:
index c4cdd02f2338f8b9df0bb4e2186520b1ee6a7ca5..d0562eb13814825239e7cddeb8faceec3a94864a 100644 (file)
@@ -13,7 +13,7 @@ Idx Name          Size      VMA               LMA               File off  Algn
   0 \.text         0+4  0+  0+  0+  2\*\*2
                   CONTENTS, ALLOC, LOAD, CODE
   1 \.data         0+4  2000000000000000  2000000000000000  0+  2\*\*2
-                  CONTENTS, ALLOC, LOAD
+                  CONTENTS, ALLOC, LOAD, DATA
   2 \.MMIX\.spec_data\.80 0+14  0+  0+  0+  2\*\*2
                   CONTENTS
 Contents of section \.text:
index 7f64948971bfc4565455f497ed3b6f74f915411c..64d8bf9cf615bdb13cab3d084901339a9823875f 100644 (file)
@@ -13,7 +13,7 @@ Idx Name          Size      VMA               LMA               File off  Algn
   0 \.text         0+4  0+  0+  0+  2\*\*2
                   CONTENTS, ALLOC, LOAD, CODE
   1 \.data         0+4  2000000000000000  2000000000000000  0+  2\*\*2
-                  CONTENTS, ALLOC, LOAD
+                  CONTENTS, ALLOC, LOAD, DATA
   2 \.MMIX\.spec_data\.80 0+18  0+  0+  0+  2\*\*2
                   CONTENTS
 Contents of section \.text:
index f37e57a4d5cfa9945968aaa0b9a9e0bd4ebc4b21..ef2edb93d394978ed72a49573a5e3f85a3e2b4ae 100644 (file)
@@ -13,7 +13,7 @@ Idx Name          Size      VMA               LMA               File off  Algn
   0 \.text         0+4  0+  0+  0+  2\*\*2
                   CONTENTS, ALLOC, LOAD, CODE
   1 \.data         0+4  2000000000000000  2000000000000000  0+  2\*\*2
-                  CONTENTS, ALLOC, LOAD
+                  CONTENTS, ALLOC, LOAD, DATA
   2 \.MMIX\.spec_data\.80 0+1c  0+  0+  0+  2\*\*2
                   CONTENTS
 Contents of section \.text:
index e1d678485e8bac32c85cdbc17a27f2368af44172..00a5347f99fc6b532da9111fca9b69069d7731f3 100644 (file)
@@ -13,7 +13,7 @@ Idx Name          Size      VMA               LMA               File off  Algn
   0 \.text         0+4  0+  0+  0+  2\*\*2
                   CONTENTS, ALLOC, LOAD, CODE
   1 \.data         0+4  2000000000000000  2000000000000000  0+  2\*\*2
-                  CONTENTS, ALLOC, LOAD
+                  CONTENTS, ALLOC, LOAD, DATA
   2 \.MMIX\.spec_data\.80 0+20  0+  0+  0+  2\*\*2
                   CONTENTS
 Contents of section \.text: