GNU Binutils with patches for OS216
修訂 | 33c5e3a91d4d2265fc4c8a44210952616680b10b (tree) |
---|---|
時間 | 2005-10-20 03:33:25 |
作者 | H.J. Lu <hjl.tools@gmai...> |
Commiter | H.J. Lu |
2005-10-19 H.J. Lu <hongjiu.lu@intel.com>
* ld-ia64/ia64.exp: Check link order for ld -r.
@@ -1,3 +1,7 @@ | ||
1 | +2005-10-19 H.J. Lu <hongjiu.lu@intel.com> | |
2 | + | |
3 | + * ld-ia64/ia64.exp: Check link order for ld -r. | |
4 | + | |
1 | 5 | 2005-10-18 Alan Modra <amodra@bigpond.net.au> |
2 | 6 | |
3 | 7 | * ld-scripts/crossref.exp: Add -mcall-aixdesc to CFLAGS for |
@@ -52,3 +52,49 @@ set ia64tests { | ||
52 | 52 | } |
53 | 53 | |
54 | 54 | run_ld_link_tests $ia64tests |
55 | + | |
56 | +# Check link order | |
57 | +proc link_order {} { | |
58 | + global AS | |
59 | + global LD | |
60 | + global READELF | |
61 | + global srcdir | |
62 | + global subdir | |
63 | + | |
64 | + set testname "link order" | |
65 | + if ![ld_assemble $AS $srcdir/../../binutils/testsuite/binutils-all/link-order.s tmpdir/link-order.o] { | |
66 | + unresolved $testname | |
67 | + return | |
68 | + } | |
69 | + | |
70 | + if ![ld_simple_link $LD tmpdir/link-order.ro "-r tmpdir/link-order.o"] { | |
71 | + unresolved $testname | |
72 | + return | |
73 | + } | |
74 | + | |
75 | + verbose -log "$READELF -t --wide tmpdir/link-order.o | grep IA_64_UNWIND > tmpdir/link-order.o.out" | |
76 | + catch "exec $READELF -t --wide tmpdir/link-order.o | grep IA_64_UNWIND > tmpdir/link-order.o.out" exec_output | |
77 | + set exec_output [prune_warnings $exec_output] | |
78 | + if ![string match "" $exec_output] then { | |
79 | + unresolved $testname | |
80 | + return | |
81 | + } | |
82 | + | |
83 | + verbose -log "$READELF -t --wide tmpdir/link-order.ro | grep IA_64_UNWIND > tmpdir/link-order.ro.out" | |
84 | + catch "exec $READELF -t --wide tmpdir/link-order.ro | grep IA_64_UNWIND > tmpdir/link-order.ro.out" exec_output | |
85 | + set exec_output [prune_warnings $exec_output] | |
86 | + if ![string match "" $exec_output] then { | |
87 | + unresolved $testname | |
88 | + return | |
89 | + } | |
90 | + | |
91 | + verbose -log "cmp tmpdir/link-order.o.out tmpdir/link-order.ro.out" | |
92 | + catch "exec cmp tmpdir/link-order.o.out tmpdir/link-order.ro.out" exec_output | |
93 | + if ![string match "" $exec_output] then { | |
94 | + fail $testname | |
95 | + } else { | |
96 | + pass $testname | |
97 | + } | |
98 | +} | |
99 | + | |
100 | +link_order |