summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-ia64
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2005-10-20 17:54:53 +0000
committerH.J. Lu <hjl@lucon.org>2005-10-20 17:54:53 +0000
commit0ca506529523ff42f9bd73c965cd8e7e4a77b9f0 (patch)
tree56695398ee04ebe5d69d1c3ff3127eba4cbbc1a2 /ld/testsuite/ld-ia64
parentbecde272795950fe6cd910bf9d2a465a1f436cab (diff)
downloadbinutils-redhat-0ca506529523ff42f9bd73c965cd8e7e4a77b9f0.tar.gz
2005-10-20 H.J. Lu <hongjiu.lu@intel.com>
* ld-ia64/ia64.exp: Undo the last change. Add support for *.d. * ld-ia64/link-order.d: New file.
Diffstat (limited to 'ld/testsuite/ld-ia64')
-rw-r--r--ld/testsuite/ld-ia64/ia64.exp49
-rw-r--r--ld/testsuite/ld-ia64/link-order.d9
2 files changed, 14 insertions, 44 deletions
diff --git a/ld/testsuite/ld-ia64/ia64.exp b/ld/testsuite/ld-ia64/ia64.exp
index 7bab713728..b7ee50f296 100644
--- a/ld/testsuite/ld-ia64/ia64.exp
+++ b/ld/testsuite/ld-ia64/ia64.exp
@@ -53,48 +53,9 @@ set ia64tests {
run_ld_link_tests $ia64tests
-# Check link order
-proc link_order {} {
- global AS
- global LD
- global READELF
- global srcdir
- global subdir
-
- set testname "link order"
- if ![ld_assemble $AS $srcdir/../../binutils/testsuite/binutils-all/link-order.s tmpdir/link-order.o] {
- unresolved $testname
- return
- }
-
- if ![ld_simple_link $LD tmpdir/link-order.ro "-r tmpdir/link-order.o"] {
- unresolved $testname
- return
- }
-
- verbose -log "$READELF -t --wide tmpdir/link-order.o | grep IA_64_UNWIND > tmpdir/link-order.o.out"
- catch "exec $READELF -t --wide tmpdir/link-order.o | grep IA_64_UNWIND > tmpdir/link-order.o.out" exec_output
- set exec_output [prune_warnings $exec_output]
- if ![string match "" $exec_output] then {
- unresolved $testname
- return
- }
-
- verbose -log "$READELF -t --wide tmpdir/link-order.ro | grep IA_64_UNWIND > tmpdir/link-order.ro.out"
- catch "exec $READELF -t --wide tmpdir/link-order.ro | grep IA_64_UNWIND > tmpdir/link-order.ro.out" exec_output
- set exec_output [prune_warnings $exec_output]
- if ![string match "" $exec_output] then {
- unresolved $testname
- return
- }
-
- verbose -log "cmp tmpdir/link-order.o.out tmpdir/link-order.ro.out"
- catch "exec cmp tmpdir/link-order.o.out tmpdir/link-order.ro.out" exec_output
- if ![string match "" $exec_output] then {
- fail $testname
- } else {
- pass $testname
- }
+set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
+foreach t $test_list {
+ # We need to strip the ".d", but can leave the dirname.
+ verbose [file rootname $t]
+ run_dump_test [file rootname $t]
}
-
-link_order
diff --git a/ld/testsuite/ld-ia64/link-order.d b/ld/testsuite/ld-ia64/link-order.d
new file mode 100644
index 0000000000..53a3794af1
--- /dev/null
+++ b/ld/testsuite/ld-ia64/link-order.d
@@ -0,0 +1,9 @@
+#source: ../../../binutils/testsuite/binutils-all/link-order.s
+#ld: -r
+#readelf: -S --wide
+
+#...
+ \[[ ]+1\] \.text.*[ \t]+PROGBITS[ \t0-9a-f]+AX.*
+#...
+ \[[ 0-9]+\] \.IA_64.unwind[ \t]+IA_64_UNWIND[ \t0-9a-f]+AL[ \t]+1[ \t]+1[ \t]+8
+#pass