-# Copyright (C) 1994 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
setup_xfail "m68*-*-hpux*" "m68*-*-sunos*" "m68*-*-coff" "m68*-*-vxworks*"
setup_xfail "m68*-ericsson-ose" "m68k*-motorola-sysv*"
setup_xfail "i*86-*-linuxaout*" "i*86-*-aout*"
- setup_xfail "i*86-*-sysv*" "i*86-*-isc*" "i*86-*-sco*" "i*86-*-coff"
+ setup_xfail "i*86-*-sysv3" "i*86-*-isc*" "i*86-*-sco*" "i*86-*-coff"
setup_xfail "i*86-*-aix*" "i*86-*-go32*"
setup_xfail "a29k-*-udi" "a29k-*-coff" "a29k-*-vxworks*"
setup_xfail "i960-*-vxworks*" "i960-*-coff"
send_log "$line\n"
verbose $line
if ![string match $line "S0130000746D706469722F636F70792E7372656397\r"] {
- fail "objcopy -O srec (bad header)"
+ send_log "bad header\n"
+ fail "objcopy -O srec"
} else {
while {[gets $file line] != -1 \
&& [regexp "^S\[123\]\[0-9a-fA-F\]+\r$" $line]} {
send_log "$line\n"
verbose $line
if ![regexp "^S\[789\]\[0-9a-fA-F\]+\r$" $line] then {
- fail "objcopy -O srec (bad trailer)"
+ send_log "bad trailer\n"
+ fail "objcopy -O srec"
} else {
if {[gets $file line] != -1} then {
+ send_log "garbage at end\n"
send_log "$line\n"
verbose $line
- fail "objcopy -O srec (garbage at end)"
+ fail "objcopy -O srec"
} else {
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -f tmpdir/copy.srec"]
if ![regexp "file format srec" $got] then {
- fail "objcopy -O srec (objdump failed)"
+ send_log "objdump failed\n"
+ fail "objcopy -O srec"
} else {
pass "objcopy -O srec"
}
fail "objcopy --set-start"
} else {
if {$srecstart != 0x7654} then {
- fail "objcopy --set-start ($srecstart != 0x7654)"
+ send_log "$srecstart != 0x7654\n"
+ fail "objcopy --set-start"
} else {
pass "objcopy --set-start"
}
fail "objcopy --adjust-start"
} else {
if {$srecstart != $origstart + 0x123} then {
- fail "objcopy --adjust-start ($srecstart != $origstart + 0x123)"
+ send_log "$srecstart != $origstart + 0x123\n"
+ fail "objcopy --adjust-start"
} else {
pass "objcopy --adjust-start"
}
}
# Test adjusting the overall VMA, and adjusting the VMA of a
-# particular section. We again only test this when # generating S
+# particular section. We again only test this when generating S
# records.
set low ""
set headers [binutils_run $OBJDUMP "$OBJDUMPFLAGS -h tmpdir/bintest.o"]
-set headers_regexp "SECTION\[ 0-9\]+\\\[(\[^\]\]*)\\\]\[^\n\r\]*size\[ \]*(\[0-9a-fA-F\]+)\[ \]*vma\[ \]*(\[0-9a-fA-F\]+)(.*)"
+set headers_regexp "SECTION\[ 0-9\]+\\\[(\[^\]\]*)\\\]\[^\n\r\]*size\[ \]*(\[0-9a-fA-F\]+)\[0-9a-zA-Z \]*lma\[ \]*(\[0-9a-fA-F\]+)(.*)"
set got $headers
while {[regexp $headers_regexp $got all name size vma rest]} {
set vma 0x$vma
- if {$low == "" || $vma < $low} then {
- set low $vma
- set lowname $name
+ set size 0x$size
+ if {$size != 0} {
+ if {$low == "" || $vma < $low} {
+ set low $vma
+ set lowname $name
+ }
}
set got $rest
}
} else {
set vma 0x$vma
if {$vma != $low + 0x123} then {
- fail "objcopy --adjust-vma ($vma != $low + 0x123)"
+ send_log "$vma != $low + 0x123\n"
+ fail "objcopy --adjust-vma"
} else {
if {$start != $origstart + 0x123} then {
- fail "objcopy --adjust-vma ($start != $origstart + 0x123)"
+ send_log "$start != $origstart + 0x123\n"
+ fail "objcopy --adjust-vma"
} else {
pass "objcopy --adjust-vma"
}
} else {
set vma 0x$vma
if {$vma != $low + 4} then {
- fail "objcopy --adjust-section-vma + ($vma != $low + 4)"
+ send_log "$vma != $low + 4\n"
+ fail "objcopy --adjust-section-vma +"
} else {
pass "objcopy --adjust-section-vma +"
}
} else {
set vma 0x$vma
if {$vma != $low + 4} then {
- fail "objcopy --adjust-section-vma = ($vma != $low + 4)"
+ send_log "$vma != $low + 4\n"
+ fail "objcopy --adjust-section-vma ="
} else {
pass "objcopy --adjust-section-vma ="
}