blob: a1f86986fb3758cedd82dc7fd3752a3dc66a45c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# 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
|