1 # Expect script
for ld-s390 tests
2 # Copyright
(C
) 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 s390 linking
; all types of relocs. This tests the assembler and
20 # tools like objdump as well as the linker.
22 if { !([istarget
"s390-*-*"] || [istarget "s390x-*-*"]) } {
26 # List contains test
-items with
3 items followed by
2 lists
:
27 #
0:name 1:ld options
2:assembler options
28 #
3:filenames of assembler files
4: action and options.
5: name of output file
31 # objdump
: Apply objdump options
on result. Compare with regex
(last
arg).
32 # nm
: Apply nm options
on result. Compare with regex
(last
arg).
33 # readelf
: Apply readelf options
on result. Compare with regex
(last
arg).
36 {"TLS -fpic -shared transitions" "-shared -melf_s390"
37 "-m31" {tlspic1.s tlspic2.s}
38 {{readelf
-Ssrl tlspic.rd
} {objdump
-dzrj.
text tlspic.dd
}
39 {objdump
-sj.got tlspic.sd
} {objdump
-sj.tdata tlspic.td
}}
41 {"Helper shared library" "-shared -melf_s390"
42 "-m31" {tlslib.s} {} "libtlslib.so"}
43 {"TLS -fpic and -fno-pic exec transitions"
44 "-melf_s390 tmpdir/libtlslib.so" "-m31" {tlsbinpic.s tlsbin.s}
45 {{readelf
-Ssrl tlsbin.rd
} {objdump
-dzrj.
text tlsbin.dd
}
46 {objdump
-sj.got tlsbin.sd
} {objdump
-sj.tdata tlsbin.td
}}
51 {"TLS -fpic -shared transitions" "-shared -melf64_s390"
52 "-m64 -Aesame" {tlspic1_64.s tlspic2_64.s}
53 {{readelf
-WSsrl tlspic_64.rd
} {objdump
-dzrj.
text tlspic_64.dd
}
54 {objdump
-sj.got tlspic_64.sd
} {objdump
-sj.tdata tlspic_64.td
}}
56 {"Helper shared library" "-shared -melf64_s390"
57 "-m64 -Aesame" {tlslib_64.s} {} "libtlslib_64.so"}
58 {"TLS -fpic and -fno-pic exec transitions"
59 "-melf64_s390 tmpdir/libtlslib_64.so" "-m64 -Aesame"
60 {tlsbinpic_64.s tlsbin_64.s
}
61 {{readelf
-WSsrl tlsbin_64.rd
} {objdump
-dzrj.
text tlsbin_64.dd
}
62 {objdump
-sj.got tlsbin_64.sd
} {objdump
-sj.tdata tlsbin_64.td
}}
66 if [istarget
"s390-*-*"] {
67 run_ld_link_tests $s390tests
70 if [istarget
"s390x-*-*"] {
71 run_ld_link_tests $s390xtests