# 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"
# 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
}
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}]} {