diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2005-10-19 17:39:43 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2005-10-19 17:39:43 +0000 |
commit | ad2fb2cdb9644c9f478d92cb4b1ccba7715b3bc3 (patch) | |
tree | d40a32ba539870914013394b499a06015d984491 | |
parent | 44444f50d6d51202afd4517b2277a4128efeeb42 (diff) | |
download | fsf-binutils-gdb-ad2fb2cdb9644c9f478d92cb4b1ccba7715b3bc3.zip fsf-binutils-gdb-ad2fb2cdb9644c9f478d92cb4b1ccba7715b3bc3.tar.gz fsf-binutils-gdb-ad2fb2cdb9644c9f478d92cb4b1ccba7715b3bc3.tar.bz2 |
2005-10-19 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/1321
* binutils-all/link-order.s: New.
* binutils-all/objcopy.exp: Check ia64 link order.
-rw-r--r-- | binutils/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/link-order.s | 13 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/objcopy.exp | 39 |
3 files changed, 59 insertions, 0 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog index 481ad98..cb93df2 100644 --- a/binutils/testsuite/ChangeLog +++ b/binutils/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2005-10-19 H.J. Lu <hongjiu.lu@intel.com> + + PR binutils/1321 + * binutils-all/link-order.s: New. + + * binutils-all/objcopy.exp: Check ia64 link order. + 2005-10-11 Danny Smith <dannysmith@users.sourceforge.net> * binutils-all/windres/escapex-2.rc: New file. diff --git a/binutils/testsuite/binutils-all/link-order.s b/binutils/testsuite/binutils-all/link-order.s new file mode 100644 index 0000000..5994cb8 --- /dev/null +++ b/binutils/testsuite/binutils-all/link-order.s @@ -0,0 +1,13 @@ + .text + .align 16 + .global foo# + .proc foo# +foo: + .prologue 2, 2 + .vframe r2 + mov r2 = r12 + .body + .restore sp + mov r12 = r2 + br.ret.sptk.many b0 + .endp foo# diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp index f96113e..cb4c0c1 100644 --- a/binutils/testsuite/binutils-all/objcopy.exp +++ b/binutils/testsuite/binutils-all/objcopy.exp @@ -648,3 +648,42 @@ switch [copy_setup] { strip_executable_with_saving_a_symbol "$STRIP" "-K main -K _main $STRIPFLAGS" "$test4" } } + +# ia64 specific tests +if { ([istarget "ia64-*-elf*"] + || [istarget "ia64-*-linux*"]) } { + if {![binutils_assemble $srcdir/$subdir/link-order.s tmpdir/bintest.o]} then { + perror "unresolved ia64 link order." + unresolved "objcopy (ia64 link order)" + } else { + # Test that objcopy does not modify a file with link order bit + # when copying it. + + set got [binutils_run $OBJCOPY "$OBJCOPYFLAGS $tempfile ${copyfile}.o"] + + if ![string match "" $got] then { + fail "objcopy (ia64 link order)" + } else { + send_log "cmp $tempfile ${copyfile}.o\n" + verbose "cmp $tempfile ${copyfile}.o" + if [is_remote host] { + set src1 tmpdir/bintest.o + set src2 tmpdir/copy.o + remote_upload host $tempfile $src1 + remote_upload host ${copyfile}.o $src2 + } else { + set src1 ${tempfile} + set src2 ${copyfile}.o + } + set status [remote_exec build cmp "${src1} ${src2}"] + set exec_output [lindex $status 1] + set exec_output [prune_warnings $exec_output] + + if [string match "" $exec_output] then { + pass "objcopy (ia64 link order)" + } else { + fail "objcopy (ia64 link order)" + } + } + } +} |