2005-10-19 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 19 Oct 2005 18:33:25 +0000 (18:33 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 19 Oct 2005 18:33:25 +0000 (18:33 +0000)
* ld-ia64/ia64.exp: Check link order for ld -r.

ld/testsuite/ChangeLog
ld/testsuite/ld-ia64/ia64.exp

index a93a2c2f4cd4076e95a8ecfbf23743109db737b3..c39343d1615b842e876512c87a1f00f74178e706 100644 (file)
@@ -1,3 +1,7 @@
+2005-10-19  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * ld-ia64/ia64.exp: Check link order for ld -r.
+
 2005-10-18  Alan Modra  <amodra@bigpond.net.au>
 
        * ld-scripts/crossref.exp: Add -mcall-aixdesc to CFLAGS for
index b5723b27ea4c441c8f4ba589806017a0b95dff1d..7bab713728504d00a484bdee436b4b842c087c82 100644 (file)
@@ -52,3 +52,49 @@ 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
+    }
+}
+
+link_order
This page took 0.025755 seconds and 4 git commands to generate.