diff options
author | Alan Modra <amodra@gmail.com> | 2025-08-26 18:50:30 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2025-08-27 21:45:12 +0930 |
commit | d8867f5d1bf878b6857ee7f9be28a1b8317c40e3 (patch) | |
tree | 10d1dc8a3385fc13bac6b2f9dba175790780441c | |
parent | 3fa891a80c5faba051afb0e6607f6b347bf61f9a (diff) | |
download | binutils-d8867f5d1bf878b6857ee7f9be28a1b8317c40e3.zip binutils-d8867f5d1bf878b6857ee7f9be28a1b8317c40e3.tar.gz binutils-d8867f5d1bf878b6857ee7f9be28a1b8317c40e3.tar.bz2 |
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.
-rw-r--r-- | binutils/testsuite/binutils-all/ar.exp | 4 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/objcopy.exp | 30 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/tek2.obj | 8 |
3 files changed, 36 insertions, 6 deletions
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 @@ tek1.obj: *: 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 @@ if { ![is_xcoff_format] } { } 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 |