* lib/ld-lib.exp (run_ld_link_exec_tests): Add new parameter
[deliverable/binutils-gdb.git] / ld / testsuite / ld-elf / elf.exp
index f975d42289e352b159dbf44d99f7e42274f4a79f..5cba7433015843fc2b24a042304249d90319813b 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for various ELF tests.
-#   Copyright 2002 Free Software Foundation, Inc.
+#   Copyright 2002, 2003 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,7 +13,7 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
 #
 
 # Exclude non-ELF targets.
@@ -28,3 +28,20 @@ foreach t $test_list {
     verbose [file rootname $t]
     run_dump_test [file rootname $t]
 }
+
+# The following tests require running the executable generated by ld.
+if ![isnative] {
+    return
+}
+
+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"}
+    {"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
This page took 0.024832 seconds and 4 git commands to generate.