]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - ld/testsuite/ld-scripts/weak.exp
Fix support for PECOFF weak symbols
[thirdparty/binutils-gdb.git] / ld / testsuite / ld-scripts / weak.exp
index 3167ea45fedfe13d50a0d756467f739f6cc46ff9..8a8072f6fd5f0cbcaf7e975a0515b223cbefa384 100644 (file)
@@ -1,6 +1,6 @@
 # Test weak symbols.
 # By Ian Lance Taylor, Cygnus Solutions.
-#   Copyright 2001
+#   Copyright 2001, 2004
 #   Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 
 set testname "weak symbols"
 
-# This test only works for ELF targets.  It ought to work for some
-# a.out targets, but it doesn't.
-if ![is_elf_format] {
+# This test only works for ELF targets.
+# It ought to work for some a.out targets, but it doesn't.
+if {! [is_elf_format] && ! [is_pecoff_format]} {
+    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/weak1.s tmpdir/weak1.o]
     || ! [ld_assemble $as $srcdir/$subdir/weak2.s tmpdir/weak2.o]} then {