XCOFF ld testsuite fixes
authorAlan Modra <amodra@gmail.com>
Mon, 6 Jul 2020 06:45:35 +0000 (16:15 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 7 Jul 2020 08:56:34 +0000 (18:26 +0930)
* testsuite/ld-scripts/align.exp: Don't exclude xcoff.  Pass
-bnogc ld option for xcoff.
* testsuite/ld-scripts/provide.exp: Likewise.
* testsuite/ld-scripts/data.exp: Pass -bnogc ld option for xcoff.
* testsuite/ld-scripts/default-script.exp: Likewise.
* testsuite/ld-scripts/defined.exp: Likewise.
* testsuite/ld-scripts/empty-address.exp: Likewise.
* testsuite/ld-scripts/expr.exp: Likewise.
* testsuite/ld-scripts/include.exp: Likewise.
* testsuite/ld-scripts/script.exp: Likewise.
* testsuite/ld-scripts/assign-loc.d: Don't exclude xcoff.
* testsuite/ld-scripts/defined3.d: Likewise.
* testsuite/ld-scripts/defined4.d: Likewise.
* testsuite/ld-scripts/pr18963.d: Likewise.
* testsuite/ld-scripts/sane1.d: Likewise.
* testsuite/ld-scripts/segment-start.d: Likewise.
* testsuite/ld-scripts/include-1.d: Likewise, and relax text vma.
* testsuite/ld-scripts/defined5.d: Update xfail and comment.
* testsuite/ld-scripts/defined5.s: Tweak "defined" to be at
non-zero section offset.
* testsuite/ld-scripts/fill16.d: xfail for xcoff.
* testsuite/ld-scripts/provide-2.d: Accept more symbols.
* testsuite/ld-scripts/provide-4.d: Likewise.
* testsuite/ld-scripts/provide-5.d: Likewise.
* testsuite/ld-scripts/provide-6.d: Likewise.
* testsuite/ld-scripts/provide-7.d: Likewise.
* testsuite/ld-scripts/align.t: Accept xcoff mapped .text and .data.
* testsuite/ld-scripts/defined3.t: Likewise.
* testsuite/ld-scripts/defined4.t: Likewise.
* testsuite/ld-scripts/defined5.t: Likewise.
* testsuite/ld-scripts/fill.t: Likewise.
* testsuite/ld-scripts/include-subdata.t: Likewise.
* testsuite/ld-scripts/provide-1.t: Likewise.
* testsuite/ld-scripts/provide-2.t: Likewise.
* testsuite/ld-scripts/provide-3.t: Likewise.
* testsuite/ld-scripts/provide-4.t: Likewise.
* testsuite/ld-scripts/provide-5.t: Likewise.
* testsuite/ld-scripts/provide-6.t: Likewise.
* testsuite/ld-scripts/provide-7.t: Likewise.
* testsuite/ld-scripts/provide-8.t: Likewise.
* testsuite/ld-scripts/assign-loc.t: Add required xcoff sections.
* testsuite/ld-scripts/sizeof.t: Likewise.
* testsuite/ld-scripts/align2.t: Likewise, and mapped sections.
* testsuite/ld-scripts/align5.t: Likewise.
* testsuite/ld-scripts/default-script.t: Likewise.
* testsuite/ld-scripts/empty-address-1.t: Likewise.
* testsuite/ld-scripts/empty-address-2a.t: Likewise.
* testsuite/ld-scripts/empty-address-2b.t: Likewise.
* testsuite/ld-scripts/empty-address-3a.t: Likewise.
* testsuite/ld-scripts/empty-address-3b.t: Likewise.
* testsuite/ld-scripts/empty-address-3c.t: Likewise.
* testsuite/ld-scripts/include-sections.t: Likewise.
* testsuite/ld-scripts/pr14962.t: Likewise.
* testsuite/ld-scripts/sane1.t: Likewise.

53 files changed:
ld/ChangeLog
ld/testsuite/ld-scripts/align.exp
ld/testsuite/ld-scripts/align.t
ld/testsuite/ld-scripts/align2.t
ld/testsuite/ld-scripts/align5.t
ld/testsuite/ld-scripts/assign-loc.d
ld/testsuite/ld-scripts/assign-loc.t
ld/testsuite/ld-scripts/data.exp
ld/testsuite/ld-scripts/default-script.exp
ld/testsuite/ld-scripts/default-script.t
ld/testsuite/ld-scripts/defined.exp
ld/testsuite/ld-scripts/defined3.d
ld/testsuite/ld-scripts/defined3.t
ld/testsuite/ld-scripts/defined4.d
ld/testsuite/ld-scripts/defined4.t
ld/testsuite/ld-scripts/defined5.d
ld/testsuite/ld-scripts/defined5.s
ld/testsuite/ld-scripts/defined5.t
ld/testsuite/ld-scripts/empty-address-1.t
ld/testsuite/ld-scripts/empty-address-2a.t
ld/testsuite/ld-scripts/empty-address-2b.t
ld/testsuite/ld-scripts/empty-address-3a.t
ld/testsuite/ld-scripts/empty-address-3b.t
ld/testsuite/ld-scripts/empty-address-3c.t
ld/testsuite/ld-scripts/empty-address.exp
ld/testsuite/ld-scripts/expr.exp
ld/testsuite/ld-scripts/fill.t
ld/testsuite/ld-scripts/fill16.d
ld/testsuite/ld-scripts/include-1.d
ld/testsuite/ld-scripts/include-sections.t
ld/testsuite/ld-scripts/include-subdata.t
ld/testsuite/ld-scripts/include.exp
ld/testsuite/ld-scripts/pr14962.t
ld/testsuite/ld-scripts/pr18963.d
ld/testsuite/ld-scripts/provide-1.t
ld/testsuite/ld-scripts/provide-2.d
ld/testsuite/ld-scripts/provide-2.t
ld/testsuite/ld-scripts/provide-3.t
ld/testsuite/ld-scripts/provide-4.d
ld/testsuite/ld-scripts/provide-4.t
ld/testsuite/ld-scripts/provide-5.d
ld/testsuite/ld-scripts/provide-5.t
ld/testsuite/ld-scripts/provide-6.d
ld/testsuite/ld-scripts/provide-6.t
ld/testsuite/ld-scripts/provide-7.d
ld/testsuite/ld-scripts/provide-7.t
ld/testsuite/ld-scripts/provide-8.t
ld/testsuite/ld-scripts/provide.exp
ld/testsuite/ld-scripts/sane1.d
ld/testsuite/ld-scripts/sane1.t
ld/testsuite/ld-scripts/script.exp
ld/testsuite/ld-scripts/segment-start.d
ld/testsuite/ld-scripts/sizeof.t

index ce29d72249a410fb55b6da13f30aabc4d0af985e..655932f207b16f57d18d42255ddcc17d19a78512 100644 (file)
@@ -1,3 +1,60 @@
+2020-07-07  Alan Modra  <amodra@gmail.com>
+
+       * testsuite/ld-scripts/align.exp: Don't exclude xcoff.  Pass
+       -bnogc ld option for xcoff.
+       * testsuite/ld-scripts/provide.exp: Likewise.
+       * testsuite/ld-scripts/data.exp: Pass -bnogc ld option for xcoff.
+       * testsuite/ld-scripts/default-script.exp: Likewise.
+       * testsuite/ld-scripts/defined.exp: Likewise.
+       * testsuite/ld-scripts/empty-address.exp: Likewise.
+       * testsuite/ld-scripts/expr.exp: Likewise.
+       * testsuite/ld-scripts/include.exp: Likewise.
+       * testsuite/ld-scripts/script.exp: Likewise.
+       * testsuite/ld-scripts/assign-loc.d: Don't exclude xcoff.
+       * testsuite/ld-scripts/defined3.d: Likewise.
+       * testsuite/ld-scripts/defined4.d: Likewise.
+       * testsuite/ld-scripts/pr18963.d: Likewise.
+       * testsuite/ld-scripts/sane1.d: Likewise.
+       * testsuite/ld-scripts/segment-start.d: Likewise.
+       * testsuite/ld-scripts/include-1.d: Likewise, and relax text vma.
+       * testsuite/ld-scripts/defined5.d: Update xfail and comment.
+       * testsuite/ld-scripts/defined5.s: Tweak "defined" to be at
+       non-zero section offset.
+       * testsuite/ld-scripts/fill16.d: xfail for xcoff.
+       * testsuite/ld-scripts/provide-2.d: Accept more symbols.
+       * testsuite/ld-scripts/provide-4.d: Likewise.
+       * testsuite/ld-scripts/provide-5.d: Likewise.
+       * testsuite/ld-scripts/provide-6.d: Likewise.
+       * testsuite/ld-scripts/provide-7.d: Likewise.
+       * testsuite/ld-scripts/align.t: Accept xcoff mapped .text and .data.
+       * testsuite/ld-scripts/defined3.t: Likewise.
+       * testsuite/ld-scripts/defined4.t: Likewise.
+       * testsuite/ld-scripts/defined5.t: Likewise.
+       * testsuite/ld-scripts/fill.t: Likewise.
+       * testsuite/ld-scripts/include-subdata.t: Likewise.
+       * testsuite/ld-scripts/provide-1.t: Likewise.
+       * testsuite/ld-scripts/provide-2.t: Likewise.
+       * testsuite/ld-scripts/provide-3.t: Likewise.
+       * testsuite/ld-scripts/provide-4.t: Likewise.
+       * testsuite/ld-scripts/provide-5.t: Likewise.
+       * testsuite/ld-scripts/provide-6.t: Likewise.
+       * testsuite/ld-scripts/provide-7.t: Likewise.
+       * testsuite/ld-scripts/provide-8.t: Likewise.
+       * testsuite/ld-scripts/assign-loc.t: Add required xcoff sections.
+       * testsuite/ld-scripts/sizeof.t: Likewise.
+       * testsuite/ld-scripts/align2.t: Likewise, and mapped sections.
+       * testsuite/ld-scripts/align5.t: Likewise.
+       * testsuite/ld-scripts/default-script.t: Likewise.
+       * testsuite/ld-scripts/empty-address-1.t: Likewise.
+       * testsuite/ld-scripts/empty-address-2a.t: Likewise.
+       * testsuite/ld-scripts/empty-address-2b.t: Likewise.
+       * testsuite/ld-scripts/empty-address-3a.t: Likewise.
+       * testsuite/ld-scripts/empty-address-3b.t: Likewise.
+       * testsuite/ld-scripts/empty-address-3c.t: Likewise.
+       * testsuite/ld-scripts/include-sections.t: Likewise.
+       * testsuite/ld-scripts/pr14962.t: Likewise.
+       * testsuite/ld-scripts/sane1.t: Likewise.
+
 2020-07-07  Alan Modra  <amodra@gmail.com>
 
        * testsuite/ld-scripts/align.exp: Use is_pecoff_format.
index 38172517302402e6685fdbc8779df3721b6ab1e0..9370aca6c8d114ce38946a0d44c8362c9a55097e 100644 (file)
 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
 # MA 02110-1301, USA.
 
-if {[istarget "powerpc*-*-aix*"] || [istarget "rs6000-*-aix*"]} {
-    # Target maps .text and .data to other sections.
-    return
-}
-
 set testname "align1"
 
 if ![ld_assemble $as $srcdir/$subdir/align.s tmpdir/align.o] {
@@ -35,6 +30,8 @@ if ![ld_assemble $as $srcdir/$subdir/align.s tmpdir/align.o] {
 set saved_LDFLAGS "$LDFLAGS"
 if { [is_pecoff_format] } then {
     set LDFLAGS "$LDFLAGS --image-base 0"
+} elseif { [is_xcoff_format] } then {
+    set LDFLAGS "$LDFLAGS -bnogc"
 }
 
 if ![ld_link $ld tmpdir/align "$LDFLAGS -T $srcdir/$subdir/align.t tmpdir/align.o"] {
index 81c21c6cae82d8d7b8262970b462b992dafba783..63bf95aa56a467492b1623779074a5397f12285c 100644 (file)
@@ -1,6 +1,6 @@
 SECTIONS
 {
-  .text : {*(.text)}
+  .text : {*(.text .pr)}
   .data ALIGN(0x1000) : AT (ALIGN (LOADADDR (.text) + SIZEOF (.text), 0x80))
     {}
   ASSERT (LOADADDR(.data) == 0x80, "dyadic ALIGN broken")
index d86f62aeab33734e13da41961759989680aa7ec6..29ae10e6cc3a137fc806724907d2140f3ee49a00 100644 (file)
@@ -1,7 +1,8 @@
 SECTIONS
 {
-  .text : {*(.text)}
+  .text : {*(.text .pr)}
   . = ALIGN(data_align);
-  .data : {*(.data)}
+  .data : {*(.data .rw)}
+  .bss : {*(.bss)}
   /DISCARD/ : {*(*)}
 }
index a0b33e58be0437d41d779b07eee1002c8278ce7a..103b216327ea94373a3002fe774741599b6f9357 100644 (file)
@@ -1,12 +1,15 @@
 SECTIONS
 {
   .text : {
-    SORT_NONE (*) (.text .text.*)
+    SORT_NONE (*) (.text .text.* .pr)
   }
 
   .data : {
-    SORT_NONE (*) (.data .data.*)
+    SORT_NONE (*) (.data .data.* .rw)
     foo = .;
   }
+  .bss : {
+    SORT_NONE (*) (.bss)
+  }
   /DISCARD/ : {*(*)}
 }
index f3115b08a606ebc2f6c136265633f456ff599d1d..308df97fcaebf6dacb36b3d6112e9aa32baed7d6 100644 (file)
@@ -1,7 +1,7 @@
 #ld: -T assign-loc.t
 #source: data.s
 #nm: -n
-#xfail: powerpc*-*-aix* rs6000-*-aix*
+
 #...
 0+0100 A HEAP_SIZE
 #...
index e8c5102438fa8aaf685966be23202af429acd7c6..e5b5acd604413a91f091628cf53762bef7a7624f 100644 (file)
@@ -13,5 +13,8 @@ SECTIONS
 
   _end = .;
 
+  .text : { *(.text) }
+  .data : { *(.data) }
+  .bss : { *(.bss) }
   /DISCARD/ : { *(*) }
 }
index d221af42b9923d735c1c7fd6853155c99a870e49..4e20cf7ec154d15ba4f0acec5fa5846aad20f70b 100644 (file)
@@ -27,6 +27,13 @@ if {[is_aout_format]} {
        return
 }
 
+set old_LDFLAGS $LDFLAGS
+if { [is_xcoff_format] } then {
+    set LDFLAGS "$LDFLAGS -bnogc"
+}
+
 run_dump_test data
 run_dump_test fill
 run_dump_test fill16
+
+set LDFLAGS $old_LDFLAGS
index 5c9bf1f1ce8c9c1103f46c17ca7c5ba5f1a6a7e9..832c2bb847eb2f82eac03a3cdb4c8c854f9db687 100644 (file)
@@ -21,6 +21,8 @@
 set old_ldflags $LDFLAGS
 if { [istarget spu*-*-*] } {
     set LDFLAGS "$LDFLAGS --local-store 0:0"
+} elseif { [is_xcoff_format] } {
+    set LDFLAGS "$LDFLAGS -bnogc"
 }
 
 set test_list [lsort [glob -nocomplain $srcdir/$subdir/default-script*.d]]
index ff0fcda7a934ff10af663a4b5295f0e3df7ec94f..c800e921b0a5251a1a1984a344732e7c809172cb 100644 (file)
@@ -2,6 +2,8 @@ _START = DEFINED(_START) ? _START : 0x900;
 SECTIONS
 {
   . = _START;
-  .text : {*(.text)}
+  .text : {*(.text .pr)}
+  .data : {*(.data)}
+  .bss : {*(.bss)}
   /DISCARD/ : {*(*)}
 }
index 7a47030c70d235b764229a70cb563b2785009cd1..18e5c13244127b54fef34d088b203df116361ffa 100644 (file)
@@ -30,6 +30,8 @@ if ![ld_assemble $as $srcdir/$subdir/defined.s tmpdir/def.o] {
 set saved_LDFLAGS "$LDFLAGS"
 if { [is_pecoff_format] } then {
     set LDFLAGS "$LDFLAGS --image-base 0"
+} elseif { [is_xcoff_format] } then {
+    set LDFLAGS "$LDFLAGS -bnogc"
 }
 
 if { ![ld_link $ld tmpdir/def "$LDFLAGS -T $srcdir/$subdir/defined.t tmpdir/def.o"] } {
index 3401e7cbcd9789bbbb257afb9a9805a4b4862258..0b3831c6fbdced78de3e8baca657447c55bc003f 100644 (file)
@@ -2,7 +2,6 @@
 #nm: -B
 #source: phdrs.s
 #source: defined.s
-#xfail: powerpc*-*-aix* rs6000-*-aix*
 
 # Check that DEFINED matches only symbols defined before its location.
 # The ellipsis account for target-specific symbols.  Matching both A and T
index 1fe6eef54e4d686445c65afbe765b199f39471f8..ede74c9099c79bf644f46a86aef91078f828f8c4 100644 (file)
@@ -1,6 +1,6 @@
 defined6 = DEFINED (sym2) ? 1 : 0;
 SECTIONS {
-       .text : { *(.text) sym2 = .; }
+       .text : { *(.text .pr) sym2 = .; }
        .data : { *(.data) }
        .bss : { *(.bss) *(COMMON) }
 }
index 0d6e7c54ece2af3fc0106eb8839ea5d92a6575fb..7cc48dac4184486650c3b62a0288190be21adc62 100644 (file)
@@ -1,7 +1,6 @@
 #ld: -Tdefined4.t
 #nm: -B
 #source: defined4.s
-#xfail: powerpc*-*-aix* rs6000-*-aix*
 #xfail: mips*-*-*
 # We check that defined and defined1 have the same address.  MIPS targets
 # use different address.
index 1221df2bf1bdf8c7aa36fe5d0fbc41d30d48dd9f..92a8941da36acd588ceafa190cfb1eb09350e62e 100644 (file)
@@ -1,6 +1,6 @@
 SECTIONS {
        .text : { *(.text) }
-       .data : { *(.data) }
+       .data : { *(.data .rw) }
        .bss : { *(.bss) *(COMMON) }
 }
 defined1 = defined;
index 8b2574362f8e38f4f6981c3ddfdac1ff5654f963..2530c0e09eaa22b86455a2ce44800e0539a0e413 100644 (file)
@@ -1,7 +1,8 @@
 #ld: -Tdefined5.t
 #nm: -B
 #source: defined5.s
-#xfail: powerpc*-*-aix* rs6000-*-aix*
+#xfail: [is_xcoff_format]
+# xcoff outputs value of "defined" from the object file
 
 # Check that arithmetic on DEFINED works.
 #...
index 9dd58d693be63a4d452680541ea511f6841f9459..16ece95b99053cb4e904ee1c58b08bd7ec9e8c8c 100644 (file)
@@ -2,5 +2,5 @@
        .data
        .byte 0
        .text
-defined:
        .byte 0
+defined:
index 04daf6606db4da4719de5067c17f05d18b59d6de..6fabceb29a5899554c1ac4fdcfac9ec4ab9f0d56 100644 (file)
@@ -1,7 +1,7 @@
 defined = addr1;
 SECTIONS {
-       .text : { *(.text) }
+       .text : { *(.text .pr) }
        . = ALIGN (0x1000);
-       .data : { *(.data) }
+       .data : { *(.data .rw) }
        addr1  = ADDR (.data);
 }
index 7c4b8151c7a971af09a25a9aee4c0b1e48eb956c..a24f25a138b71c28b7910aa44d8152f53e63e6e1 100644 (file)
@@ -1,11 +1,12 @@
 SECTIONS
 {
-  .text 0x0000000: { *(.text) }
+  .text 0: { *(.text .pr) }
   .data 0x200:
   {
     __data_start = . ;
     *(.data)
   }
   __data_end = .;
+  .bss : { *(.bss) }
   /DISCARD/ : { *(.*) }
 }
index 6a40ad8b7c43d34dfac287ce19925c167a2e84d4..0ab29a4db28ca9f8c6a4666f6d51f1d85d69955d 100644 (file)
@@ -1,7 +1,8 @@
 SECTIONS
 {
-  .text : { *(.text) }
+  .text : { *(.text .pr) }
   .data : { *(.data) }
   __data_end = .;
+  .bss : { *(.bss) }
   /DISCARD/ : { *(.*) }
 }
index dcf264f4a28f1136499f165355b3553c0aa9c84f..c6d1e523fc2f720fff9064755a7c310a763c7e0e 100644 (file)
@@ -1,11 +1,12 @@
 SECTIONS
 {
-  .text 0x0000000: { *(.text) }
+  .text 0x0000000: { *(.text .pr) }
   .data :
   {
     PROVIDE (__data_start = .);
     *(.data)
   }
   __data_end = .;
+  .bss : { *(.bss) }
   /DISCARD/ : { *(.*) }
 }
index 2807e71f561f3e819d686e156279581b78c957b6..28767a19c510a07f220f9070c446c93a1a50ba4c 100644 (file)
@@ -1,10 +1,11 @@
 SECTIONS
 {
-  .text 0x00000000: { *(.text) }
+  .text 0x00000000: { *(.text .pr) }
   .data ALIGN(0x1000) + (. & (0x1000 - 1)):
   {
     *(.data)
   }
   __data_end = .;
+  .bss : { *(.bss) }
   /DISCARD/ : { *(.*) }
 }
index 4f213af519eae19035cc5d0a0f717a653d0dee72..6da242188585ea0693a69eb8fedebc00c9e389fc 100644 (file)
@@ -1,11 +1,12 @@
 SECTIONS
 {
-  .text 0x00000000: { *(.text) }
+  .text 0x00000000: { *(.text .pr) }
   .data ALIGN(0x1000) + (. & (0x1000 - 1)):
   {
     PROVIDE (__data_start = .);
     *(.data)
   }
   __data_end = .;
+  .bss : { *(.bss) }
   /DISCARD/ : { *(.*) }
 }
index 6de519881fed7c7a4065503992cf85d7924358b9..0829c58a3e4ee0603fd9a8d711813da8167d0efa 100644 (file)
@@ -1,11 +1,12 @@
 SECTIONS
 {
-  .text 0x00000000: { *(.text) }
+  .text 0x00000000: { *(.text .pr) }
   .data ALIGN(0x1000) + (. & (0x1000 - 1)):
   {
     __data_start = .;
     *(.data)
   }
   __data_end = .;
+  .bss : { *(.bss) }
   /DISCARD/ : { *(.*) }
 }
index d71202a303695e5fa8c76a78f6db69b59d3181db..0bd45b98a9e8940cb7c6d4b96d3389c4b4703fcc 100644 (file)
@@ -22,6 +22,8 @@
 set old_LDFLAGS $LDFLAGS
 if { [is_pecoff_format] } then {
     set LDFLAGS "$LDFLAGS --image-base 0"
+} elseif { [is_xcoff_format] } then {
+    set LDFLAGS "$LDFLAGS -bnogc"
 }
 
 run_dump_test empty-address-1
index 7b1c62751d0eeb8c9a2c2820ef5512c2b6fd7bcd..be7d6b8b4f546acbd5b9f6e150cb3128a43d2902 100644 (file)
@@ -24,6 +24,8 @@ if { [istarget spu*-*-*] } then {
     set LDFLAGS "$LDFLAGS --no-overlays --local-store 0:0"
 } elseif { [is_pecoff_format] } then {
     set LDFLAGS "$LDFLAGS --image-base 0"
+} elseif { [is_xcoff_format] } then {
+    set LDFLAGS "$LDFLAGS -bnogc"
 }
 
 run_dump_test expr1
index 835e009c48cb74baff182c857a704c9d1c787db9..63f4f848995928a396ce68e86229b7b0bb9d3505 100644 (file)
@@ -3,12 +3,12 @@ SECTIONS
   .text :
   {
     . += 4;
-    *0.o(.text)
+    *0.o(.text .pr)
     FILL (0x12)
-    *1.o(.text)
+    *1.o(.text .pr)
     . += 1;
     FILL (0x23)
-    *2.o(.text)
+    *2.o(.text .pr)
     FILL (0x003456)
     . += 4;
     FILL (0x00004567000089ab0000cdef00000123)
index 6ff109993210e113d24436f0e4b9635a2d0e0e31..19be5f2c46d8d694f7ab12a356dccb2e5b5dd460 100644 (file)
@@ -3,7 +3,7 @@
 #source: fill16_2.s
 #ld: -T fill.t
 #objdump: -s -j .text
-#skip: arm-*-coff i[3-7]86-*-coff
+#skip: arm-*-coff i[3-7]86-*-coff [is_xcoff_format]
 #xfail: alpha*-*-*ecoff sh-*-pe sparc*-*-coff
 #xfail: tic30-*-coff tic4x-*-* tic54x-*-* z8k-*-*
 #xfail: z80-*-coff
index 4ad1fe8cc082d6fe1b2d82cd6acbcd3901b3cf86..117d331419833b23225cbfec306248c88c25d34a 100644 (file)
@@ -1,13 +1,12 @@
-# name: include-1
-# source: include.s
-# ld: -T include-1.t
-# objdump: -w -h
-# xfail: "*-aix*"
-# AIX targets rename the .text and .data sectons...
+#name: include-1
+#source: include.s
+#ld: -T include-1.t
+#objdump: -w -h
 
 .*:     file format .*
 
 Sections:
 Idx +Name +Size +VMA +LMA +File off +Algn +Flags
-  0 .text         0+0000020  0+0000000  0+0000000  [0-9a-f]+  2\*\*[0-9]+  CONTENTS, ALLOC, LOAD,.*CODE
+  0 .text         0+(20|1000)  0+0000000  0+0000000  [0-9a-f]+  2\*\*[0-9]+  CONTENTS, ALLOC, LOAD,.*CODE
   1 .data         0+0000010  0+0100000  0+0100000  [0-9a-f]+  2\*\*[0-9]+  CONTENTS, ALLOC, LOAD, DATA
+#pass
index 5d6ca1e1ba423fcf63cf91e0f67c7e4e71699cae..51a86edaa2ddcf8b07db078c4cfd41fab2650726 100644 (file)
@@ -1,5 +1,6 @@
 SECTIONS {
-        .text : { *(.text) } >rom
+        .text : { *(.text .pr) } >rom
         INCLUDE include-data.t
+        .bss : { *(.bss) }
         /DISCARD/ : { *(*) }
 }
index 136c9f4926d97c8b517eef196a760c0d172946a6..8024e12e68d35fb67908a763fb1fd1b4c4f21822 100644 (file)
@@ -1,2 +1,2 @@
- *(.data)
+ *(.data .rw)
 
index c7e2ee58a0366f9810bfe0f1204cc9a072c7d8c9..a0bdc5aba859033329ad63e3cd5a588cdb482e9f 100644 (file)
@@ -27,6 +27,8 @@ if { [istarget spu*-*-*] } then {
     set LDFLAGS "$LDFLAGS --local-store 0:0 --no-overlays"
 } elseif { [is_pecoff_format] } then {
     set LDFLAGS "$LDFLAGS --image-base 0"
+} elseif { [is_xcoff_format] } then {
+    set LDFLAGS "$LDFLAGS -bnogc"
 }
 
 set test_list [lsort [glob -nocomplain $srcdir/$subdir/include*.d]]
index f399acdcef994b297ca0856a82f77c1e68ccdb1b..8780908e5a67d103d6d112a6fe2f7da8cc71281a 100644 (file)
@@ -2,7 +2,8 @@ NOCROSSREFS ( .text .data )
 x = ABSOLUTE(x);
 SECTIONS
 { 
-  .text : { *(.text) }
-  .data : { *(.data) }
+  .text : { *(.text .pr) }
+  .data : { *(.data .rw) }
+  .bss : { *(.bss) }
   /DISCARD/ : { *(*) }
 }
index 875fe136ad732a865b2d2a21969140d68e619fcc..bda3b063a4504a3fed82e609b25c201cd1498795 100644 (file)
@@ -1,9 +1,8 @@
 # source: data.s
 # ld: -T pr18963.t
 # nm: -B -n
-# notarget: *-*-aix* *-*-vms
-# Skip on AIX targets because they require non-empty sections.
-# Plus skip for VMS based targets as the linker automatically adds extra libraries that may not be present in a cross build.
+# notarget: *-*-vms
+# Skip for VMS based targets as the linker automatically adds extra libraries that may not be present in a cross build.
 # 64-bit Cygwin targets always start their sections at 0x200000000 which is why the regexps include a 2.
 
 #...
index 6b96b3389c6e8e1441f75249448c4e735e04d051..0cce3562d2aa338de6027f7c2440dbeb6205993b 100644 (file)
@@ -5,7 +5,7 @@ SECTIONS
     LONG (foo)
     LONG (bar)
     . = ALIGN (0x10);
-    *(.data)
+    *(.data .rw)
   }
   PROVIDE (foo = .);
   PROVIDE (bar = .);
index e151b306b22223e752551a3501ecac878f973537..88513e8cbde4c329aecd991c77decf7fca6743c5 100644 (file)
@@ -3,5 +3,6 @@
 #nm: -B
 #...
 0+3 A baz
+#...
 0+2000 D foo
 #pass
index abf6eb324a4af646eabf6ed8aa1c8b686fe4c332..885093c08c76f80cfea5eec289cd2d92e294024d 100644 (file)
@@ -6,6 +6,6 @@ SECTIONS
   PROVIDE (baz = 3);
   .data 0x2000 :
   {
-    *(.data)
+    *(.data .rw)
   }
 }
index f6229d4bc0c108a88b88f339034201e0e482a68a..753d76d7be7a5ff41bf346e9a0075d97011704f0 100644 (file)
@@ -4,7 +4,7 @@ SECTIONS
   {
     LONG (foo)
     LONG (bar)
-    *(.data)
+    *(.data .rw)
   }
   foo = .;
   bar = .;
index b77b7dc19488fb5695f2ec6e1a1ef8d146bf54f4..dab25847fbed67ed34d5f2549e96115ca4378582 100644 (file)
@@ -4,6 +4,10 @@
 #map: provide-4.map
 #...
 0+3 A baz
+#...
 0+2000 D foo
+#...
 0+2010 D loc2
+#...
 0+2030 A loc4
+#pass
index da663db215b9a7c62ee7c46e898dbf7248602b68..5bf581d727d42f8fe82ebe2a5586681a2b826161 100644 (file)
@@ -6,7 +6,7 @@ SECTIONS
   PROVIDE (baz = 3);
   .data 0x2000 :
   {
-    *(.data)
+    *(.data .rw)
 
     PROVIDE (loc1 = ALIGN (., 0x10));
     PROVIDE (loc2 = ALIGN (., 0x10));
index c7f9ddb7ba811766e023337efbdb80c0b4b6e09a..852c1c6af4b3ae8a3de49a360e5d91858cdeb765 100644 (file)
@@ -4,3 +4,4 @@
 #map: provide-5.map
 #...
 0+10 A foo
+#pass
index eda741e05c8f35385633868eda25e6ecf296a075..fc18279517995f1020dca90caa66c786a8a2d5a9 100644 (file)
@@ -5,6 +5,6 @@ SECTIONS
 
   .data 0x1000 :
   {
-    *(.data)
+    *(.data .rw)
   }
 }
index fda3c2bd2739cd18a6f01d9d8b22a613e0d7a899..6b3808ee4e2ac87680db5f096004747ceec8ee60 100644 (file)
@@ -5,5 +5,6 @@
 
 #...
 0+1000 D foo
+#...
 0+1000 D foo_2
 #...
index 6b5d11c04bd3b76ab9df48cda5068a83a879aa0b..518593e8f23fdc857f74a3323fb0f4cce7a5c1f1 100644 (file)
@@ -2,7 +2,7 @@ SECTIONS
 {
   .data 0x1000 :
   {
-    *(.data)
+    *(.data .rw)
   }
 
   foo = ADDR (.data);
index e2c950400219046d9e2ccc6812f6ac8b8ae1fbd6..396a721df531477c5f33c86ee7a4c5013b56e377 100644 (file)
@@ -4,5 +4,6 @@
 
 #...
 0+10 A foo
+#...
 0+10 A foo_2
 #...
index 882883eda05f273cf2fd0842b87307feb6c4b672..d317f2e9cb1e309edafd6c7ab730059924678548 100644 (file)
@@ -2,7 +2,7 @@ SECTIONS
 {
   .data 0x1000 :
   {
-    *(.data)
+    *(.data .rw)
   }
 
   foo = 0x10;
index ffc3467911fb86d2888b8bbc39e0a3071b3e9d91..a44f2f1f6b45cd445107b1ae6de01c40eb077123 100644 (file)
@@ -2,7 +2,7 @@ SECTIONS
 {
   .data 0x1000 :
   {
-    *(.data)
+    *(.data .rw)
     QUAD (__FOO);
   }
 
index 34aed400a1e0975fea0e19b0c160041afa36a2da..da31a3701c7a8b684debdc98a05f4a6041fdd6f5 100644 (file)
 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
 # MA 02110-1301, USA.
 
-# AIX maps .text and .data to other sections.
 # a.out objdump displays the file header inside the text segment,
 # confusing run_dump_test.
 
-if {[istarget "powerpc*-*-aix*"] || [istarget "rs6000-*-aix*"] || [is_aout_format]} {
+if { [is_aout_format] } {
     unsupported provide-1
     unsupported provide-2
     unsupported provide-3
@@ -33,6 +32,8 @@ if {[istarget "powerpc*-*-aix*"] || [istarget "rs6000-*-aix*"] || [is_aout_forma
 set saved_LDFLAGS "$LDFLAGS"
 if { [is_pecoff_format] } then {
     set LDFLAGS "$LDFLAGS --image-base 0"
+} elseif { [is_xcoff_format] } then {
+    set LDFLAGS "$LDFLAGS -bnogc"
 }
 
 set test_list [lsort [glob -nocomplain $srcdir/$subdir/provide-*.d]]
index 66d6eac1739c00a0d71aa44617b91785520f9add..adc75ba5831e54c25da56f24b3025e32c4f247ee 100644 (file)
@@ -1,9 +1,8 @@
 # source: data.s
 # ld: -T sane1.t
 # nm: -B -n
-# notarget: mmix-* pdp11-* powerpc*-*-aix* rs6000-*-aix*
+# notarget: mmix-* pdp11-*
 # mmix symbol sections are wrong, pdp sign extends 16-bit addresses
-# rs6000-aix doesn't like empty .text
 
 #...
 0+0004 A s5
index 90ee9b62d0dc58697c8dc139f7242df6d4ec27f0..09c1409990e0e008a8ee2c08c1983b974f9e1de2 100644 (file)
@@ -20,8 +20,10 @@ SECTIONS
     s4 = ABSOLUTE (d1) - 2;
     s5 = ABSOLUTE (d2) % 5;
     s6 = ABSOLUTE (d2) / 5;
-    *(.data)
+    *(.data .rw)
   }
+  .text : { *(.text) }
+  .bss : { *(.bss) }
   /DISCARD/ : {*(*)}
 
 diff = d2 - d1;
index 108e53989fb6ef3cf7b2d8fc78f65a24727e3a4a..58d8b8b7cd87dfd631c1057f03495c7dbc1964af 100644 (file)
@@ -187,6 +187,9 @@ set old_LDFLAGS $LDFLAGS
 if { [is_pecoff_format] } then {
     set flags "--image-base 0"
     set LDFLAGS "$LDFLAGS --image-base 0"
+} elseif { [is_xcoff_format] } then {
+    set flags "-bnogc"
+    set LDFLAGS "$LDFLAGS -bnogc"
 }
 
 if ![ld_link $ld tmpdir/script "$flags -T $srcdir/$subdir/script.t tmpdir/script.o"] {
index eea87ff242f1e2e322b1fde978925e925098125e..0e124b22d3e80c453447f55ad844b57142b28099 100644 (file)
@@ -2,7 +2,7 @@
 #source: segment-start.s
 #ld: -e 0 -u __executable_start -T segment-start.ld
 #nm: -B
-#xfail: mmix-*-* pdp11-*-* powerpc-*-aix* powerpc-*-beos* rs6000-*-* sh-*-pe
+#xfail: mmix-*-* pdp11-*-* sh-*-pe
 #xfail: tic30-*-*aout* c54x*-*-*coff* tic54x-*-*coff*
 # XFAIL targets that are not expected to handle SEGMENT_START correctly.
 
index 6244a37b7ac2e1ca34973052b1a47f1c4601694c..e637994943ef7dd62980659cf6bbfc573b043272 100644 (file)
@@ -11,7 +11,12 @@ SECTIONS {
            . = . + SIZEOF(.text);
            data_end = .;
          }
-}      
+       .bss :
+         {
+           . = 8;
+           *(.bss)
+         }
+}
 
 sizeof_text = SIZEOF(.text);
 sizeof_data = SIZEOF(.data);
This page took 0.044049 seconds and 4 git commands to generate.