PR46, cygwin: FAIL: cdtest with -Ur
authorAlan Modra <amodra@gmail.com>
Thu, 21 Nov 2019 06:52:41 +0000 (17:22 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 21 Nov 2019 08:39:18 +0000 (19:09 +1030)
See the comment in pe.sc to understand why ld -Ur won't work.

PR 46
binutils/
* testsuite/lib/binutils-common.exp (is_pecoff_format): Rewrite
with positive logic and add more target triples.
ld/
* scripttempl/pe.sc: Comment on ld -Ur fail.  Wrap .gcc_exc comment.
* scripttempl/pep.sc: Likewise.
* testsuite/ld-cdtest/cdtest.exp (test2): xfail for pe.

binutils/ChangeLog
binutils/testsuite/lib/binutils-common.exp
ld/ChangeLog
ld/scripttempl/i386beos.sc
ld/scripttempl/mcorepe.sc
ld/scripttempl/pe.sc
ld/scripttempl/pep.sc
ld/testsuite/ld-cdtest/cdtest.exp

index eed7d335e11101724578ecf91af76fb7e2a6650f..10ab37ce3da055768a59221d538381e5f105100f 100644 (file)
@@ -1,3 +1,8 @@
+2019-11-21  Alan Modra  <amodra@gmail.com>
+
+       * testsuite/lib/binutils-common.exp (is_pecoff_format): Rewrite
+       with positive logic and add more target triples.
+
 2019-11-19  Alan Modra  <amodra@gmail.com>
 
        PR 24499
index a523f4b7813211c97647f0ba4eb07bb227a3e39f..3b229babeb96d848e6ea74e211c15cd4993d2c96 100644 (file)
@@ -95,14 +95,17 @@ proc is_aout_format {} {
 # True if the object format is known to be PE COFF.
 #
 proc is_pecoff_format {} {
-    if { ![istarget *-*-mingw*]
-        && ![istarget *-*-cygwin*]
-        && ![istarget *-*-cegcc*]
-        && ![istarget *-*-pe*] } {
-       return 0
+    if { [istarget *-*-beospe*]
+        || [istarget *-*-cegcc*]
+        || [istarget *-*-cygwin*]
+        || [istarget *-*-interix*]
+        || [istarget *-*-mingw*]
+        || [istarget *-*-netbsdpe*]
+        || [istarget *-*-pe*]
+        || [istarget *-*-winnt*] } {
+       return 1
     }
-
-    return 1
+    return 0
 }
 
 proc is_som_format {} {
index 39646cb1dc8ebbd4ed51fa3d220c93afba8cff7b..e4e3f7405849e75815c18949e19db95bf73839ab 100644 (file)
@@ -1,3 +1,12 @@
+2019-11-21  Alan Modra  <amodra@gmail.com>
+
+       PR 46
+       * scripttempl/pe.sc: Comment on ld -Ur fail.  Wrap .gcc_exc comment.
+       * scripttempl/pep.sc: Likewise.
+       * scripttempl/i386beos.sc: Wrap .gcc_exc comment.
+       * scripttempl/mcorepe.sc: Likewise.
+       * testsuite/ld-cdtest/cdtest.exp (test2): xfail for pe.
+
 2019-11-12  Jim Wilson  <jimw@sifive.com>
 
        PR 25181
index f4ce42ccded5a11bbefc737194448167d5ed906c..b45b83fc9ea959d9751a96c5e8d89daae668dd12 100644 (file)
@@ -69,7 +69,7 @@ SECTIONS
     ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
                        LONG (-1); *(.dtors); *(.dtor);  LONG (0); }
     ${RELOCATING+ KEEP (*(SORT_NONE(.fini)))}
-    /* ??? Why is .gcc_exc here?  */
+    ${RELOCATING+/* ??? Why is .gcc_exc here?  */}
     ${RELOCATING+ *(.gcc_exc)}
     ${RELOCATING+ etext = .;}
     ${RELOCATING+ __text_end__ = .;}
index e7cf3d3544531388e90fdf78d2be89b57f284347..eea70271bb5c1813da13e74641eb541bc2885a62 100644 (file)
@@ -76,7 +76,7 @@ SECTIONS
     ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
                        LONG (-1); *(.dtors); *(.dtor);  LONG (0); }
     ${RELOCATING+ KEEP (*(SORT_NONE(.fini)))}
-    /* ??? Why is .gcc_exc here?  */
+    ${RELOCATING+/* ??? Why is .gcc_exc here?  */}
     ${RELOCATING+ *(.gcc_exc)}
     ${RELOCATING+ etext = .;}
     *(.gcc_except_table)
index 865ee58d919c3a159661737f1dcd0e9ac10819bd..8b5e1a1dad77e67ad58ac7cd7ec49a0c2bc46eb5 100644 (file)
@@ -104,6 +104,7 @@ SECTIONS
           expectation that they will be overridden by the definitions
          here.  If we PROVIDE the symbols then they will not be
          overridden and global constructors will not be run.
+         See PR 22762 for more details.
          
          This does mean that it is not possible for a user to define
          their own __CTOR_LIST__ and __DTOR_LIST__ symbols; if they do,
@@ -113,7 +114,9 @@ SECTIONS
          (The custom script can just be a copy of this script with the
          PROVIDE() qualifiers added).
 
-         See PR 22762 for more details.  */
+         In particular this means that ld -Ur does not work, because
+         the proper __CTOR_LIST__ set by ld -Ur is overridden by a
+         bogus __CTOR_LIST__ set by the final link.  See PR 46.  */
        ___CTOR_LIST__ = .;
        __CTOR_LIST__ = .;
        LONG (-1);
@@ -134,7 +137,7 @@ SECTIONS
        LONG (0);
      }
     ${RELOCATING+KEEP (*(SORT_NONE(.fini)))}
-    /* ??? Why is .gcc_exc here?  */
+    ${RELOCATING+/* ??? Why is .gcc_exc here?  */}
     ${RELOCATING+ *(.gcc_exc)}
     ${RELOCATING+PROVIDE (etext = .);}
     ${RELOCATING+PROVIDE (_etext = .);}
index e6d594c2bbe267827bf6837b743e8b3fccca3f87..950f578c7a6726f9a0c0edd28f8005d66f977b89 100644 (file)
@@ -105,6 +105,7 @@ SECTIONS
           expectation that they will be overridden by the definitions
          here.  If we PROVIDE the symbols then they will not be
          overridden and global constructors will not be run.
+         See PR 22762 for more details.
          
          This does mean that it is not possible for a user to define
          their own __CTOR_LIST__ and __DTOR_LIST__ symbols; if they do,
@@ -114,7 +115,9 @@ SECTIONS
          (The custom script can just be a copy of this script with the
          PROVIDE() qualifiers added).
 
-         See PR 22762 for more details.  */
+         In particular this means that ld -Ur does not work, because
+         the proper __CTOR_LIST__ set by ld -Ur is overridden by a
+         bogus __CTOR_LIST__ set by the final link.  See PR 46.  */
        ___CTOR_LIST__ = .;
        __CTOR_LIST__ = .;
        LONG (-1); LONG (-1);
@@ -135,7 +138,7 @@ SECTIONS
        LONG (0); LONG (0);
      }
     ${RELOCATING+KEEP (*(SORT_NONE(.fini)))}
-    /* ??? Why is .gcc_exc here?  */
+    ${RELOCATING+/* ??? Why is .gcc_exc here?  */}
     ${RELOCATING+ *(.gcc_exc)}
     ${RELOCATING+PROVIDE (etext = .);}
     ${RELOCATING+ KEEP (*(.gcc_except_table))}
index 5d4d5fa7ff00a35efb53c72f0fed583dfcc67a82..06285386d63594537a12bb63e17e735850c6b788 100644 (file)
@@ -92,6 +92,11 @@ if ![ld_link $CC tmpdir/cdtest {tmpdir/cdtest-foo.o tmpdir/cdtest-bar.o tmpdir/c
     }
 }
 
+# PR 46
+if [is_pecoff_format] {
+    setup_xfail *-*-*
+}
+
 if ![ld_relocate $ld tmpdir/cdtest.o {-Ur tmpdir/cdtest-foo.o tmpdir/cdtest-bar.o tmpdir/cdtest-main.o}] {
     fail $test2
 } else {
This page took 0.031443 seconds and 4 git commands to generate.