This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: binutils/1321: strip/objcopy don't handle SHF_LINK_ORDER correctly
- From: "H. J. Lu" <hjl at lucon dot org>
- To: binutils at sources dot redhat dot com
- Date: Wed, 19 Oct 2005 11:31:56 -0700
- Subject: Re: PATCH: binutils/1321: strip/objcopy don't handle SHF_LINK_ORDER correctly
- References: <20051019173828.GA5051@lucon.org>
On Wed, Oct 19, 2005 at 10:38:28AM -0700, H. J. Lu wrote:
> Sorry to be this late. I am checking this testcase.
>
>
> H.J.
> ----
> 2005-10-17 H.J. Lu <hongjiu.lu@intel.com>
>
> PR binutils/1321
> * binutils-all/link-order.s: New.
>
> * binutils-all/objcopy.exp: Check ia64 link order.
>
I am checking this related test for ld -r.
H.J.
----
2005-10-19 H.J. Lu <hongjiu.lu@intel.com>
* ld-ia64/ia64.exp: Check link order for ld -r.
--- ld-ia64/ia64.exp.link-order 2005-05-16 11:04:42.000000000 -0700
+++ ld-ia64/ia64.exp 2005-10-19 11:26:53.000000000 -0700
@@ -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