* ld-elf/binutils.exp: Correct x86 gnu target match.
[deliverable/binutils-gdb.git] / ld / testsuite / ld-ifunc / ifunc.exp
index 786b32b2a454677a8fad4f89db13f70af8d1dc66..6c20dc079b96a8b1ee02c30dc77f9274ff799b77 100644 (file)
@@ -1,6 +1,6 @@
 # Expect script for linker support of IFUNC symbols and relocations.
 #
-#   Copyright 2009  Free Software Foundation, Inc.
+#   Copyright 2009, 2010 Free Software Foundation, Inc.
 #   Contributed by Red Hat.
 #
 # This file is part of the GNU Binutils.
 # Written by Nick Clifton <nickc@redhat.com>
 
 
-# IFUNC support has only been implemented for the ix86, x86_64 and powerpc
-# so far.
+# IFUNC support has only been implemented for the ix86, x86_64, powerpc,
+# and sparc so far.
 if {!(([istarget "i?86-*-*"]
        || [istarget "x86_64-*-*"]
-       || [istarget "powerpc*-*-*"])
+       || [istarget "powerpc*-*-*"]
+       || [istarget "sparc*-*-*"])
       && ([istarget "*-*-elf*"]
-         || ([istarget "*-*-linux*"]
+         || (([istarget "*-*-linux*"]
+              || [istarget "*-*-gnu*"])
              && ![istarget "*-*-*aout*"]
              && ![istarget "*-*-*oldld*"]))) } {
     verbose "IFUNC tests not run - target does not support IFUNC"
@@ -122,7 +124,7 @@ proc contains_irelative_reloc { binary_file } {
     #    080496f4  0000002a R_386_IRELATIVE
 
 
-    if { ![regexp "\[0-9a-f\]+\[ \]+\[0-9a-f\]+\[ \]+R_\[_0-9A-Z\]+_IRELATIVE\[ \]*\[0-9a-f\]*\n" [file_contents readelf.out]] } {
+    if { ![regexp "\[0-9a-f\]+\[ \]+\[0-9a-f\]+\[ \]+R_\[_0-9A-Z\]+_IREL(|ATIVE)\[ \]*\[0-9a-f\]*\n" [file_contents readelf.out]] } {
        return 0
     }
 
@@ -257,8 +259,8 @@ if {! [check_osabi tmpdir/static_prog {UNIX - Linux}]} {
     fail "Static ifunc-using executable does not have an OS/ABI field of LINUX"
     set fails [expr $fails + 1]
 }
-if {! [check_osabi tmpdir/dynamic_prog {UNIX - Linux}]} {
-    fail "Dynamic ifunc-using executable does not have an OS/ABI field of LINUX"
+if {! [check_osabi tmpdir/dynamic_prog {UNIX - System V}]} {
+    fail "Dynamic ifunc-using executable does not have an OS/ABI field of System V"
     set fails [expr $fails + 1]
 }
 if {! [check_osabi tmpdir/static_nonifunc_prog {UNIX - System V}]} {
This page took 0.027098 seconds and 4 git commands to generate.