Commit | Line | Data |
---|---|---|
b3dfd7fe | 1 | # Expect script for ld-ia64 tests |
aa820537 | 2 | # Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation |
b3dfd7fe | 3 | # |
f96b4a7b NC |
4 | # This file is part of the GNU Binutils. |
5 | # | |
6 | # This program is free software; you can redistribute it and/or modify | |
b3dfd7fe | 7 | # it under the terms of the GNU General Public License as published by |
f96b4a7b | 8 | # the Free Software Foundation; either version 3 of the License, or |
b3dfd7fe JJ |
9 | # (at your option) any later version. |
10 | # | |
11 | # This program is distributed in the hope that it will be useful, | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
15 | # | |
16 | # You should have received a copy of the GNU General Public License | |
17 | # along with this program; if not, write to the Free Software | |
f96b4a7b NC |
18 | # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, |
19 | # MA 02110-1301, USA. | |
b3dfd7fe JJ |
20 | # |
21 | ||
22 | # Test ia64 linking; all types of relocs. This tests the assembler and | |
23 | # tools like objdump as well as the linker. | |
24 | ||
25 | if { !([istarget "ia64-*-elf*"] | |
26 | || [istarget "ia64-*-linux*"]) } { | |
27 | return | |
28 | } | |
29 | ||
30 | # List contains test-items with 3 items followed by 2 lists: | |
31 | # 0:name 1:ld options 2:assembler options | |
32 | # 3:filenames of assembler files 4: action and options. 5: name of output file | |
33 | ||
34 | # Actions: | |
35 | # objdump: Apply objdump options on result. Compare with regex (last arg). | |
36 | # nm: Apply nm options on result. Compare with regex (last arg). | |
37 | # readelf: Apply readelf options on result. Compare with regex (last arg). | |
38 | ||
39 | set ia64tests { | |
a98f9b6c | 40 | {"TLS -fpic -shared" "-shared" |
8c2fda1d | 41 | "-mtune=itanium1" {tlspic1.s tlspic2.s} |
b3dfd7fe JJ |
42 | {{readelf -WSsrl tlspic.rd} {objdump -drj.text tlspic.dd} |
43 | {objdump -sj.got tlspic.sd} {objdump -sj.tdata tlspic.td}} | |
44 | "libtlspic.so"} | |
a98f9b6c | 45 | {"Helper shared library" "-shared" |
b3dfd7fe JJ |
46 | "" {tlslib.s} {} "libtlslib.so"} |
47 | {"TLS -fpic and -fno-pic exec" | |
8c2fda1d | 48 | "tmpdir/libtlslib.so" "-mtune=itanium1" {tlsbinpic.s tlsbin.s} |
b3dfd7fe JJ |
49 | {{readelf -WSsrl tlsbin.rd} {objdump -drj.text tlsbin.dd} |
50 | {objdump -sj.got tlsbin.sd} {objdump -sj.tdata tlsbin.td}} | |
51 | "tlsbin"} | |
a98f9b6c | 52 | {"TLS in debug sections" "" |
b3dfd7fe JJ |
53 | "" {tlsg.s} |
54 | {{objdump -sj.debug_foobar tlsg.sd}} "tlsg"} | |
55 | } | |
56 | ||
57 | run_ld_link_tests $ia64tests | |
33c5e3a9 | 58 | |
c9831d57 L |
59 | set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]] |
60 | foreach t $test_list { | |
61 | # We need to strip the ".d", but can leave the dirname. | |
62 | verbose [file rootname $t] | |
63 | run_dump_test [file rootname $t] | |
33c5e3a9 | 64 | } |