This commit was generated by cvs2svn to track changes on a CVS vendor
[deliverable/binutils-gdb.git] / ld / testsuite / ld-x86-64 / x86-64.exp
1 # Expect script for ld-x86_64 tests
2 # Copyright (C) 2002, 2005, 2006 Free Software Foundation
3 #
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.
8 #
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.
13 #
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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
17 #
18
19 # Test x86_64 linking; all types of relocs. This tests the assembler and
20 # tools like objdump as well as the linker.
21
22 if { !([istarget "x86_64-*-elf*"]
23 || [istarget "x86_64-*-linux*"]) } {
24 return
25 }
26
27 # List contains test-items with 3 items followed by 2 lists:
28 # 0:name 1:ld options 2:assembler options
29 # 3:filenames of assembler files 4: action and options. 5: name of output file
30
31 # Actions:
32 # objdump: Apply objdump options on result. Compare with regex (last arg).
33 # nm: Apply nm options on result. Compare with regex (last arg).
34 # readelf: Apply readelf options on result. Compare with regex (last arg).
35
36 set x86_64tests {
37 {"TLS -fpic -shared transitions" "-shared -melf_x86_64"
38 "--64" {tlspic1.s tlspic2.s}
39 {{readelf -WSsrl tlspic.rd} {objdump -drj.text tlspic.dd}
40 {objdump -sj.got tlspic.sd} {objdump -sj.tdata tlspic.td}}
41 "libtlspic.so"}
42 {"TLS descriptor -fpic -shared transitions" "-shared -melf_x86_64"
43 "--64" {tlsdesc.s tlspic2.s}
44 {{readelf -WSsrld tlsdesc.rd} {objdump -drj.text tlsdesc.dd}
45 {objdump "-s -j.got -j.got.plt" tlsdesc.sd} {objdump -sj.tdata tlsdesc.td}
46 {objdump -drj.plt tlsdesc.pd}} "libtlsdesc.so"}
47 {"Helper shared library" "-shared -melf_x86_64"
48 "--64" {tlslib.s} {} "libtlslib.so"}
49 {"TLS -fpic and -fno-pic exec transitions"
50 "-melf_x86_64 tmpdir/libtlslib.so" "--64" {tlsbinpic.s tlsbin.s}
51 {{readelf -WSsrl tlsbin.rd} {objdump -drj.text tlsbin.dd}
52 {objdump -sj.got tlsbin.sd} {objdump -sj.tdata tlsbin.td}}
53 "tlsbin"}
54 {"TLS descriptor -fpic and -fno-pic exec transitions"
55 "-melf_x86_64 tmpdir/libtlslib.so" "--64" {tlsbindesc.s tlsbin.s}
56 {{readelf -WSsrl tlsbindesc.rd} {objdump -drj.text tlsbindesc.dd}
57 {objdump -sj.got tlsbindesc.sd} {objdump -sj.tdata tlsbindesc.td}}
58 "tlsbindesc"}
59 {"TLS with global dynamic and descriptors"
60 "-shared -melf_x86_64" "--64" {tlsgdesc.s}
61 {{readelf -WSsrl tlsgdesc.rd} {objdump -drj.text tlsgdesc.dd}}
62 "libtlsgdesc.so"}
63 {"TLS in debug sections" "-melf_x86_64"
64 "--64" {tlsg.s}
65 {{objdump -sj.debug_foobar tlsg.sd}} "tlsg"}
66 }
67
68 run_ld_link_tests $x86_64tests
69
70 run_dump_test "abs"
71 run_dump_test "pcrel8"
72 run_dump_test "pcrel16"
This page took 0.030018 seconds and 4 git commands to generate.