forked from Imagelibrary/binutils-gdb
it does not already exist. * ld.bootstrap/bootstrap.exp: Don't create tmpdir here. * ld.cdtest/cdtest.exp: Likewise. * ld.scripts/defined.exp: Likewise. Also, don't set as and nm here. Change perror for no variables found to fail. * ld.scripts/script.exp: New test. * ld.scripts/script.t, ld.scripts/script.s: New files.
32 lines
1.1 KiB
Plaintext
32 lines
1.1 KiB
Plaintext
# Test basic linker script functionality
|
|
# By Ian Lance Taylor, Cygnus Support
|
|
|
|
if ![ld_assemble $as $srcdir$subdir/script.s tmpdir/script.o] { return }
|
|
|
|
if ![ld_simple_link $ld tmpdir/script "-T $srcdir$subdir/script.t tmpdir/script.o"] {
|
|
fail script
|
|
} else {
|
|
if [ld_nm $nm tmpdir/script] {
|
|
if {![info exists nm_output(text_start)] \
|
|
|| ![info exists nm_output(text_end)] \
|
|
|| ![info exists nm_output(data_start)] \
|
|
|| ![info exists nm_output(data_end)]} {
|
|
fail "script (bad output from $nm)"
|
|
} else {
|
|
if {$nm_output(text_start) != 0x100} {
|
|
fail "script (text_start == $nm_output(text_start))"
|
|
} else { if {$nm_output(text_end) < 0x104 \
|
|
|| $nm_output(text_end) > 0x110} {
|
|
fail "script (text_end == $nm_output(text_end))"
|
|
} else { if {$nm_output(data_start) != 0x1000} {
|
|
fail "script (data_start == $nm_output(data_start))"
|
|
} else { if {$nm_output(data_end) < 0x1004 \
|
|
|| $nm_output(data_end) > 0x1010} {
|
|
fail "script (data_end == $nm_output(data_end))"
|
|
} else {
|
|
pass script
|
|
} } } }
|
|
}
|
|
}
|
|
}
|