tekhex test for commit bf0f85df1254
* testsuite/binutils-all/tek2.obj: Change to a 3 byte data file
that triggers tekhex error fixed by commit bf0f85df1254.
* testsuite/binutils-all/ar.exp: Adjust to suit.
* testsuite/binutils-all/objcopy.exp (objcopy_tek2bin): New proc.
diff --git a/binutils/testsuite/binutils-all/ar.exp b/binutils/testsuite/binutils-all/ar.exp
index d06fe90..f38dce5 100644
--- a/binutils/testsuite/binutils-all/ar.exp
+++ b/binutils/testsuite/binutils-all/ar.exp
@@ -1013,8 +1013,8 @@
*: no symbols
tek2.obj:
-00000001 D _binary_x_end
-00000001 A _binary_x_size
+00000003 D _binary_x_end
+00000003 A _binary_x_size
00000000 D _binary_x_start
} $got] {
fail $testname
diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp
index ac8978f..90be636 100644
--- a/binutils/testsuite/binutils-all/objcopy.exp
+++ b/binutils/testsuite/binutils-all/objcopy.exp
@@ -1567,3 +1567,33 @@
}
run_dump_test "rename-section-01"
+
+proc objcopy_tek2bin {} {
+ global OBJCOPY
+ global OBJDUMP
+ global srcdir
+ global subdir
+
+ set tek $srcdir/$subdir/tek2.obj
+ set out tmpdir/tek2bin
+ if [isremote host] {
+ set tek [remote_download host $tek]
+ set out tek2bin
+ }
+
+ set got [binutils_run $OBJCOPY "-O binary $tek $out"]
+ if ![string equal "" $got] then {
+ send_log "$got\n"
+ fail "objcopy tek2bin"
+ } else {
+ set got [binutils_run $OBJDUMP "-s -b binary $out"]
+ if {![regexp ".* 0000 000031 .*" $got]} {
+ fail "objcopy tek2bin (objdump)"
+ } else {
+ pass "objcopy tek2bin"
+ }
+ }
+ remote_file host delete $out
+}
+
+objcopy_tek2bin
diff --git a/binutils/testsuite/binutils-all/tek2.obj b/binutils/testsuite/binutils-all/tek2.obj
index da696d1..a4e29af 100644
--- a/binutils/testsuite/binutils-all/tek2.obj
+++ b/binutils/testsuite/binutils-all/tek2.obj
@@ -1,6 +1,6 @@
-%47615103000000000000000000000000000000000000000000000000000000000000000
-%103E95.data11011
+%47616100000310000000000000000000000000000000000000000000000000000000000
+%103EB5.data11013
%1E3FB5.data4F_binary_x_start10
-%1C3735.data4D_binary_x_end11
-%1D3135*ABS*2E_binary_x_size11
+%1C3755.data4D_binary_x_end13
+%1D3155*ABS*2E_binary_x_size13
%0781010