old-cross-binutils/ld/testsuite/ld-scripts/defined.exp
Ian Lance Taylor d2c0200413 * VMS does not permits `.' in directory names. Renamed
ld.bootstrap to ld-bootstrap, ld.cdtest to ld-cdtest, and
	ld.scripts to ld-scripts.
1994-09-29 16:39:01 +00:00

29 lines
691 B
Text

# 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)]} {
fail "DEFINED (bad output from $nm)"
} 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