daily update
[binutils.git] / ld / testsuite / ld-sparc / sparc.exp
blob937678325202c481e34559d0a6808e5608498715
1 # Expect script for ld-sparc tests
2 # Copyright (C) 2002, 2003 Free Software Foundation
4 # This file is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 # Test i386 linking; all types of relocs. This tests the assembler and
20 # tools like objdump as well as the linker.
22 if { !([istarget "sparc*-*-elf*"]
23 || ([istarget "sparc*-*-linux*"]
24 && ![istarget "*-*-*aout*"]
25 && ![istarget "*-*-*oldld*"])) } {
26 return
29 # List contains test-items with 3 items followed by 2 lists:
30 # 0:name 1:ld options 2:assembler options
31 # 3:filenames of assembler files 4: action and options. 5: name of output file
33 # Actions:
34 # objdump: Apply objdump options on result. Compare with regex (last arg).
35 # nm: Apply nm options on result. Compare with regex (last arg).
36 # readelf: Apply readelf options on result. Compare with regex (last arg).
38 set sparctests {
39 {"TLS -fpic -shared transitions" "-shared -melf32_sparc"
40 "--32 -K PIC" {tlssunpic32.s tlspic.s}
41 {{readelf -WSsrl tlssunpic32.rd} {objdump -drj.text tlssunpic32.dd}
42 {objdump -sj.got tlssunpic32.sd} {objdump -sj.tdata tlssunpic32.td}}
43 "libtlssunpic32.so"}
44 {"Helper shared library" "-shared -melf32_sparc"
45 "--32 -K PIC" {tlslib.s} {} "libtlslib32.so"}
46 {"Another helper shared library" "-shared -melf32_sparc"
47 "--32 -K PIC" {tlssunbinpic32.s} {} "libtlssunbinpic32.so"}
48 {"TLS -fpic and -fno-pic exec transitions"
49 "-melf32_sparc tmpdir/libtlslib32.so tmpdir/tlssunbinpic32.o"
50 "--32" {tlssunbin32.s}
51 {{readelf -WSsrl tlssunbin32.rd} {objdump -drj.text tlssunbin32.dd}
52 {objdump -sj.got tlssunbin32.sd} {objdump -sj.tdata tlssunbin32.td}}
53 "tlssunbin32"}
54 {"TLS -fno-pic -shared" "-shared -melf32_sparc"
55 "--32" {tlssunnopic32.s tlsnopic.s}
56 {{readelf -WSsrl tlssunnopic32.rd} {objdump -drj.text tlssunnopic32.dd}
57 {objdump -sj.got tlssunnopic32.sd}} "libtlssunnopic32.so"}
58 {"TLS in debug sections" "-melf32_sparc"
59 "--32" {tlsg32.s}
60 {{objdump -sj.debug_foobar tlsg32.sd}} "tlsg32"}
62 set sparc64tests {
63 {"TLS -fpic -shared transitions" "-shared -melf64_sparc"
64 "--64 -Av9 -K PIC" {tlssunpic64.s tlspic.s}
65 {{readelf -WSsrl tlssunpic64.rd} {objdump -drj.text tlssunpic64.dd}
66 {objdump -sj.got tlssunpic64.sd} {objdump -sj.tdata tlssunpic64.td}}
67 "libtlssunpic64.so"}
68 {"Helper shared library" "-shared -melf64_sparc"
69 "--64 -Av9 -K PIC" {tlslib.s} {} "libtlslib64.so"}
70 {"Another helper shared library" "-shared -melf64_sparc"
71 "--64 -Av9 -K PIC" {tlssunbinpic64.s} {} "libtlssunbinpic64.so"}
72 {"TLS -fpic and -fno-pic exec transitions"
73 "-melf64_sparc tmpdir/libtlslib64.so tmpdir/tlssunbinpic64.o"
74 "--64 -Av9" {tlssunbin64.s}
75 {{readelf -WSsrl tlssunbin64.rd} {objdump -drj.text tlssunbin64.dd}
76 {objdump -sj.got tlssunbin64.sd} {objdump -sj.tdata tlssunbin64.td}}
77 "tlssunbin64"}
78 {"TLS -fno-pic -shared" "-shared -melf64_sparc"
79 "--64 -Av9" {tlssunnopic64.s tlsnopic.s}
80 {{readelf -WSsrl tlssunnopic64.rd} {objdump -drj.text tlssunnopic64.dd}
81 {objdump -sj.got tlssunnopic64.sd}} "libtlssunnopic64.so"}
82 {"TLS in debug sections" "-melf64_sparc"
83 "--64 -Av9" {tlsg64.s}
84 {{objdump -sj.debug_foobar tlsg64.sd}} "tlsg64"}
87 run_ld_link_tests $sparctests
88 # run_ld_link_tests $sparc64tests