tekhex test for commit bf0f85df12

* testsuite/binutils-all/tek2.obj: Change to a 3 byte data file
	that triggers tekhex error fixed by commit bf0f85df12.
	* testsuite/binutils-all/ar.exp: Adjust to suit.
	* testsuite/binutils-all/objcopy.exp (objcopy_tek2bin): New proc.
This commit is contained in:
Alan Modra
2025-08-26 18:50:30 +09:30
parent 3fa891a80c
commit d8867f5d1b
3 changed files with 36 additions and 6 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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