diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index fc82ea0eb5a..6f3ef894070 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2002-09-20  Alan Modra  <amodra@bigpond.net.au>
+
+	* ld-i386/i386.exp: Only run tests on ELF targets.
+
 2002-09-19  Jakub Jelinek  <jakub@redhat.com>
 
 	* ld-i386/i386.exp: New.
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
index 4072dd575a8..09526f8d2ad 100644
--- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp
@@ -19,7 +19,10 @@
 # Test i386 linking; all types of relocs.  This tests the assembler and
 # tools like objdump as well as the linker.
 
-if ![istarget i?86-*-*] {
+if { !([istarget "i?86-*-elf*"]		
+       || ([istarget "i?86-*-linux*"]
+	   && ![istarget "*-*-*aout*"]
+	   && ![istarget "*-*-*oldld*"])) } {
     return
 }