1994-09-28 00:06:27 +00:00
|
|
|
# Test DEFINED in a linker script.
|
|
|
|
# By Ian Lance Taylor, Cygnus Support.
|
|
|
|
|
|
|
|
if ![ld_assemble $as $srcdir$subdir/defined.s tmpdir/def.o] { return }
|
|
|
|
|
|
|
|
set prms_id 5699
|
|
|
|
|
|
|
|
if ![ld_simple_link $ld tmpdir/def "-T $srcdir$subdir/defined.t tmpdir/def.o"] {
|
|
|
|
fail DEFINED
|
|
|
|
} else {
|
|
|
|
if [ld_nm $nm tmpdir/def] {
|
|
|
|
if {![info exists nm_output(value1)] \
|
|
|
|
|| ![info exists nm_output(value2)]} {
|
1994-09-28 16:21:32 +00:00
|
|
|
fail "DEFINED (bad output from $nm)"
|
1994-09-28 00:06:27 +00:00
|
|
|
} else {
|
|
|
|
if {$nm_output(value1) != 1} {
|
|
|
|
fail "DEFINED (value1 == $nm_output(value1))"
|
|
|
|
} else {
|
|
|
|
if {$nm_output(value2) != 2} {
|
|
|
|
fail "DEFINED (value2 == $nm_output(value2))"
|
|
|
|
} else {
|
|
|
|
pass DEFINED
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
set prms_id 0
|