aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf/elf.exp
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-elf/elf.exp')
-rw-r--r--ld/testsuite/ld-elf/elf.exp22
1 files changed, 17 insertions, 5 deletions
diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp
index 1e1f738..fc21683 100644
--- a/ld/testsuite/ld-elf/elf.exp
+++ b/ld/testsuite/ld-elf/elf.exp
@@ -1,5 +1,5 @@
# Expect script for various ELF tests.
-# Copyright 2002, 2003, 2005, 2007, 2009 Free Software Foundation, Inc.
+# Copyright 2002, 2003, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
#
# This file is part of the GNU Binutils.
#
@@ -41,7 +41,8 @@ foreach t $test_list {
run_dump_test [file rootname $t]
}
-if { [istarget *-*-linux*] } {
+if { [istarget *-*-linux*]
+ || [istarget *-*-gnu*] } {
run_ld_link_tests {
{"Weak symbols in dynamic objects 1 (support)"
"-shared" "" {weak-dyn-1a.s}
@@ -71,14 +72,25 @@ if ![isnative] {
set array_tests {
{"preinit array" "" "" {preinit.c} "preinit" "preinit.out"}
- {"static preinit array" "-static" "" {preinit.c} "preinit" "preinit.out"}
{"init array" "" "" {init.c} "init" "init.out"}
- {"static init array" "-static" "" {init.c} "init" "init.out"}
{"fini array" "" "" {fini.c} "fini" "fini.out"}
+}
+set array_tests_static {
+ {"static preinit array" "-static" "" {preinit.c} "preinit" "preinit.out"}
+ {"static init array" "-static" "" {init.c} "init" "init.out"}
{"static fini array" "-static" "" {fini.c} "fini" "fini.out"}
}
# NetBSD ELF systems do not currently support the .*_array sections.
-run_ld_link_exec_tests [list "*-*-netbsdelf*"] $array_tests
+set xfails [list "*-*-netbsdelf*"]
+run_ld_link_exec_tests $xfails $array_tests
+# Be cautious to not XFAIL for *-*-linux-gnu*, *-*-kfreebsd-gnu*, etc.
+switch -regexp $target_triplet {
+ ^\[^-\]*-\[^-\]*-gnu.*$ {
+ # <http://www.gnu.org/software/hurd/open_issues/binutils/testsuite.html#static>
+ lappend xfails "*-*-*"
+ }
+}
+run_ld_link_exec_tests $xfails $array_tests_static
catch "exec rm -f tmpdir/preinit tmpdir/init tmpdir/fini" status