diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2005-10-19 18:33:25 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2005-10-19 18:33:25 +0000 |
commit | 33c5e3a91d4d2265fc4c8a44210952616680b10b (patch) | |
tree | dd3fc43803269a39cfa9d46df953eb5fb1fae1a8 /ld/testsuite/ld-ia64/ia64.exp | |
parent | ad2fb2cdb9644c9f478d92cb4b1ccba7715b3bc3 (diff) | |
download | binutils-33c5e3a91d4d2265fc4c8a44210952616680b10b.zip binutils-33c5e3a91d4d2265fc4c8a44210952616680b10b.tar.gz binutils-33c5e3a91d4d2265fc4c8a44210952616680b10b.tar.bz2 |
2005-10-19 H.J. Lu <hongjiu.lu@intel.com>
* ld-ia64/ia64.exp: Check link order for ld -r.
Diffstat (limited to 'ld/testsuite/ld-ia64/ia64.exp')
-rw-r--r-- | ld/testsuite/ld-ia64/ia64.exp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/ld/testsuite/ld-ia64/ia64.exp b/ld/testsuite/ld-ia64/ia64.exp index b5723b2..7bab713 100644 --- a/ld/testsuite/ld-ia64/ia64.exp +++ b/ld/testsuite/ld-ia64/ia64.exp @@ -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 |