old-cross-binutils/ld/testsuite/ld-m68k/m68k.exp
Maciej W. Rozycki 897aea504d * lib/ld-lib.exp (run_ld_link_tests): Add another argument, pass
its contents to ar_simple_create and ld_simple_link after
	objfiles.
	* ld-aarch64/aarch64-elf.exp: Adjust accordingly.
	* ld-alpha/alpha.exp: Likewise.
	* ld-arm/arm-elf.exp: Likewise.
	* ld-arm/export-class.exp: Likewise.
	* ld-elf/comm-data.exp: Likewise.
	* ld-elf/eh-group.exp: Likewise.
	* ld-elf/elf.exp: Likewise.
	* ld-elf/export-class.exp: Likewise.
	* ld-elfvers/vers.exp: Likewise.
	* ld-frv/tls.exp: Likewise.
	* ld-i386/export-class.exp: Likewise.
	* ld-i386/i386.exp: Likewise.
	* ld-ia64/ia64.exp: Likewise.
	* ld-libs/libs.exp: Likewise.
	* ld-m68k/m68k.exp: Likewise.
	* ld-metag/metag.exp: Likewise.
	* ld-mips-elf/comm-data.exp: Likewise.
	* ld-mips-elf/export-class.exp: Likewise.
	* ld-mips-elf/mips-elf.exp: Likewise.
	* ld-mn10300/mn10300.exp: Likewise.
	* ld-pe/pe-compile.exp: Likewise.
	* ld-pe/pe.exp: Likewise.
	* ld-plugin/plugin.exp: Likewise.
	* ld-powerpc/aix52.exp: Likewise.
	* ld-powerpc/export-class.exp: Likewise.
	* ld-powerpc/powerpc.exp: Likewise.
	* ld-s390/s390.exp: Likewise.
	* ld-sh/sh-vxworks.exp: Likewise.
	* ld-sh/sh64/sh64.exp: Likewise.
	* ld-sparc/sparc.exp: Likewise.
	* ld-tic6x/tic6x.exp: Likewise.
	* ld-tilegx/tilegx.exp: Likewise.
	* ld-tilepro/tilepro.exp: Likewise.
	* ld-undefined/entry.exp: Likewise.
	* ld-vax-elf/vax-elf.exp: Likewise.
	* ld-x86-64/dwarfreloc.exp: Likewise.
	* ld-x86-64/export-class.exp: Likewise.
	* ld-x86-64/x86-64.exp: Likewise.
	* ld-xc16x/xc16x.exp: Likewise.
	* ld-xstormy16/xstormy16.exp: Likewise.
	* ld-xtensa/xtensa.exp: Likewise.
2013-02-19 01:10:06 +00:00

93 lines
3.3 KiB
Text

# Expect script for run_dump_test based ld-m68k tests.
# Copyright 2006, 2007, 2008, 2009, 2012 Free Software Foundation, Inc.
#
# This file is part of the GNU Binutils.
#
# 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
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
# MA 02110-1301, USA.
#
# Test m68k object merging
if { ![is_elf_format] || ![istarget m68k-*-*] } {
return
}
# List contains test-items with 3 items followed by 2 lists:
# 0:name 1:ld early options 2:ld late options 3:assembler options
# 4:filenames of assembler files 5: action and options. 6: name of output file
# Actions:
# objdump: Apply objdump options on result. Compare with regex (last arg).
# nm: Apply nm options on result. Compare with regex (last arg).
# readelf: Apply readelf options on result. Compare with regex (last arg).
set m68k_mergeok_tests {
{"merge isa-a isa-a:nodiv" "-T merge.ld" "" ""
{isaa.s isaa-nodiv.s} {{objdump -p isaa.d}} "isaa-nodiv"}
{"merge isa-a isa-b" "-T merge.ld" "" ""
{isaa.s isab.s} {{objdump -p isab.d}} "isab"}
{"merge isa-a isa-aplus" "-T merge.ld" "" ""
{isaa.s isaaplus.s} {{objdump -p isaaplus.d}} "isaplus"}
{"merge isa-b isa-b:nousp" "-T merge.ld" "" ""
{isab.s isab-nousp.s} {{objdump -p isab.d}} "isab"}
{"merge isa-a isa-a:mac" "-T merge.ld" "" ""
{isaa.s isaa-mac.s} {{objdump -p isaa-mac.d}} "isaa-mac"}
{"merge isa-b isa-b:float" "-T merge.ld" "" ""
{isab.s isab-float.s} {{objdump -p isab-float.d}} "isab-float"}}
run_ld_link_tests $m68k_mergeok_tests
run_dump_test "merge-error-1a"
run_dump_test "merge-error-1b"
run_dump_test "merge-error-1c"
run_dump_test "merge-error-1d"
run_dump_test "merge-error-1e"
run_dump_test "merge-ok-1a"
run_dump_test "merge-ok-1b"
run_dump_test "merge-ok-1c"
foreach { id sources } { a { plt1.s } b { plt1-empty.s plt1.s } } {
foreach arch { 68020 cpu32 isab isac } {
run_ld_link_tests [list \
[list "PLT 1$id ($arch)" "-shared -T plt1.ld" "" "-m$arch" \
$sources [list [list objdump -dr plt1-$arch.d]] \
plt1-${id}-${arch}.so]]
}
}
if { [istarget m68k-*-linux*] } then {
run_dump_test "tls-gd-1"
run_dump_test "tls-gd-2"
run_dump_test "tls-gd-ie-1"
run_dump_test "tls-ie-1"
run_dump_test "tls-ld-1"
run_dump_test "tls-ld-2"
set m68k_tls_tests {
{"TLS definition"
"-shared" "" "" {tls-def-1.s}
{{nm -ngD tls-def-1.d}}
"tls-def-1.so"}
{"TLS direct symbol use"
"-shared tmpdir/tls-def-1.so" "" "" {tls-gd-1.s}
{{nm -ngD tls-gd-1.d2} {readelf -d tls-gd-1.d3}}
"tls-gd-1.so"}
{"TLS indirect symbol use"
"--copy-dt-needed-entries tmpdir/tls-gd-1.so -rpath-link ./" "" "" {tls-main-1.s}
{{readelf -d tls-main-1.d}}
"tls-main-1"}}
run_ld_link_tests $m68k_tls_tests
}