diff options
Diffstat (limited to 'binutils/testsuite')
-rw-r--r-- | binutils/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/objcopy.exp | 2 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/pr19020.in | 1 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/pr19020a.d | 9 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/pr19020b.d | 9 | ||||
-rw-r--r-- | binutils/testsuite/lib/utils-lib.exp | 16 |
6 files changed, 40 insertions, 6 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog index 9efe4dcbf18..f444dc7c007 100644 --- a/binutils/testsuite/ChangeLog +++ b/binutils/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2015-09-29 H.J. Lu <hongjiu.lu@intel.com> + + PR binutils/19020 + * binutils-all/objcopy.exp: Run pr19020a and pr19020b. + * lib/utils-lib.exp (run_dump_test): Support binary input. + * binutils-all/pr19020.in: New file. + * binutils-all/pr19020a.d: Likewise. + * binutils-all/pr19020b.d: Likewise. + 2015-08-11 Alan Modra <amodra@gmail.com> * binutils-all/strip-12.s: Align .bss section. diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp index cb8e33b5f71..bb33e4fb630 100644 --- a/binutils/testsuite/binutils-all/objcopy.exp +++ b/binutils/testsuite/binutils-all/objcopy.exp @@ -1022,6 +1022,8 @@ if [is_elf_format] { run_dump_test "copy-2" run_dump_test "copy-3" run_dump_test "copy-4" +run_dump_test "pr19020a" +run_dump_test "pr19020b" if [is_elf_format] { run_dump_test "strip-1" diff --git a/binutils/testsuite/binutils-all/pr19020.in b/binutils/testsuite/binutils-all/pr19020.in new file mode 100644 index 00000000000..1656f9233d9 --- /dev/null +++ b/binutils/testsuite/binutils-all/pr19020.in @@ -0,0 +1 @@ +abcdefgh
\ No newline at end of file diff --git a/binutils/testsuite/binutils-all/pr19020a.d b/binutils/testsuite/binutils-all/pr19020a.d new file mode 100644 index 00000000000..71d5813e803 --- /dev/null +++ b/binutils/testsuite/binutils-all/pr19020a.d @@ -0,0 +1,9 @@ +#PROG: objcopy +#source: pr19020.in +#as: binary +#objcopy: -O binary -I binary --pad-to=10 --gap-fill=65 --interleave=2 --interleave-width=1 --byte=0 +#objdump: -b binary -s + +#... +Contents of section .data: + 0000 61636567 41414141 4141 +acegAAAAAA + diff --git a/binutils/testsuite/binutils-all/pr19020b.d b/binutils/testsuite/binutils-all/pr19020b.d new file mode 100644 index 00000000000..41dc650da27 --- /dev/null +++ b/binutils/testsuite/binutils-all/pr19020b.d @@ -0,0 +1,9 @@ +#PROG: objcopy +#source: pr19020.in +#as: binary +#objcopy: -O binary -I binary --pad-to=10 --gap-fill=65 --reverse-bytes=8 +#objdump: -b binary -s + +#... +Contents of section .data: + 0000 68676665 64636261 4141 +hgfedcbaAA + diff --git a/binutils/testsuite/lib/utils-lib.exp b/binutils/testsuite/lib/utils-lib.exp index 9c24cf17ba7..fd5b6f630a3 100644 --- a/binutils/testsuite/lib/utils-lib.exp +++ b/binutils/testsuite/lib/utils-lib.exp @@ -447,12 +447,16 @@ proc run_dump_test { name {extra_options {}} } { set srcfile $srcdir/$subdir/$opts(source) } - set exec_output [binutils_assemble_flags ${srcfile} $tempfile $opts(as)] - if [string match "" $exec_output] then { - send_log "$exec_output\n" - verbose "$exec_output" - fail $testname - return + if { $opts(as) == "binary" } { + file copy -force ${srcfile} $tempfile + } else { + set exec_output [binutils_assemble_flags ${srcfile} $tempfile $opts(as)] + if [string match "" $exec_output] then { + send_log "$exec_output\n" + verbose "$exec_output" + fail $testname + return + } } set progopts1 $opts($program) |