]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - ld/testsuite/ld-undefined/weak-undef.exp
Fix support for PECOFF weak symbols
[thirdparty/binutils-gdb.git] / ld / testsuite / ld-undefined / weak-undef.exp
index fe21a8fc031aef1fcee5f9279201549d5171c245..e635458f0569c8de11ba1db55cc0213f752ea23d 100644 (file)
@@ -1,5 +1,5 @@
 # Test handling of weak undefined symbols
-#   Copyright 2001
+#   Copyright 2001, 2004
 #   Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
@@ -29,15 +29,23 @@ if { ![istarget *-*-sysv4*] \
      && ![istarget *-*-linux*] \
      && ![istarget *-*-irix5*] \
      && ![istarget *-*-irix6*] \
+     && ![is_pecoff_format] \
      && ![istarget *-*-solaris2*] } then {
+    unsupported $testname
     return
 }
 
 if { [istarget *-*-linux*aout*] \
      || [istarget *-*-linux*oldld*] } {
+    unsupported $testname
     return
 }
 
+# Weak symbols are broken for non-i386 PE targets.
+if {! [istarget i?86-*-*]} {
+    setup_xfail *-*-pe*
+}
+
 if {! [ld_assemble $as $srcdir/$subdir/weak-undef.s tmpdir/weak-undef.o]} then {
     # It's OK if .weak doesn't work on this target.
     unresolved $testname