This commit was generated by cvs2svn to track changes on a CVS vendor
[platform/upstream/binutils.git] / ld / testsuite / ld-selective / selective.exp
index 08287b3..4ab5872 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for LD selective linking tests
-#   Copyright (C) 1998 Free Software Foundation
+#   Copyright (C) 1998, 1999 Free Software Foundation
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # Make sure that constructors are handled correctly.
 
 
+# COFF based ports do not support selective linking
+if {[istarget "*-*-coff"]} {
+  return
+}
+if {[istarget "*-*-pe"]} {
+  return
+}
+
 set test1 "selective1"
 set test2 "selective2"
 set test3 "selective3"
 set test4 "selective4"
 set test5 "selective5"
-set test6 "selective6"
 
 set cflags "-w -O2 -ffunction-sections -fdata-sections" 
 set cxxflags "-fvtable-gc -fno-exceptions -fno-rtti"
@@ -36,7 +43,6 @@ if { [which $CXX] == 0 } {
     untested $test3
     untested $test4
     untested $test5
-    untested $test6
     return
 }
 
@@ -115,7 +121,6 @@ if ![ld_simple_link $ld tmpdir/2.x "$ldflags -u foo tmpdir/2.o"] {
      }
 }
 
-
 setup_xfail "v850*-*-elf"
 
 if { ![ld_compile "$CC $cflags $cxxflags" $srcdir/$subdir/3.cc tmpdir/3.o]} {
@@ -125,11 +130,6 @@ if { ![ld_compile "$CC $cflags $cxxflags" $srcdir/$subdir/3.cc tmpdir/3.o]} {
 
 setup_xfail "v850*-*-elf"
 
-if { ![ld_compile "$CC $cflags $cxxflags" $srcdir/$subdir/4.cc tmpdir/4.o]} {
-    unresolved $test5
-    return
-}
-
 if ![ld_simple_link $ld tmpdir/3.x "$ldflags tmpdir/3.o"] {
    fail $test4
 } else {
@@ -152,6 +152,10 @@ if ![ld_simple_link $ld tmpdir/3.x "$ldflags tmpdir/3.o"] {
       }
 }
 
+if { ![ld_compile "$CC $cflags $cxxflags" $srcdir/$subdir/4.cc tmpdir/4.o]} {
+    unresolved $test5
+    return
+}
 
 if ![ld_simple_link $ld tmpdir/4.x "$ldflags tmpdir/4.o"] {
     fail $test5
@@ -174,32 +178,3 @@ if ![ld_simple_link $ld tmpdir/4.x "$ldflags tmpdir/4.o"] {
        }
     }
 }
-
-setup_xfail "v850*-*-elf"
-
-if { ![ld_compile "$CC $cflags $cxxflags" $srcdir/$subdir/5.cc tmpdir/5.o]} {
-    unresolved $test6
-    return
-}
-
-if ![ld_simple_link $ld tmpdir/5.x "$ldflags tmpdir/5.o"] {
-    fail $test6
-} else {
-    if ![ld_nm $nm tmpdir/5.x] {
-       unresolved $test6
-    } else {
-       if {[info exists nm_output(foo__1B)] } {
-            send_log "foo__1B == $nm_output(foo__1B)\n"
-            verbose "foo__1B == $nm_output(foo__1B)"
-           fail $test6
-       } else {
-            if { [info exists nm_output(foo__1A)]} {
-                 send_log "foo__1A== $nm_output(foo__1A)\n"
-                 verbose "foo__1A == $nm_output(foo__1A)"
-                 fail $test6
-            } else {
-              pass $test6
-           }
-       }
-    }
-}