gdb/ChangeLog:
[deliverable/binutils-gdb.git] / ld / testsuite / ld-i386 / i386.exp
CommitLineData
37e55690 1# Expect script for ld-i386 tests
67a4f2b7 2# Copyright (C) 2002, 2005, 2006 Free Software Foundation
37e55690
JJ
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
75be928b 16# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
37e55690
JJ
17#
18
19# Test i386 linking; all types of relocs. This tests the assembler and
20# tools like objdump as well as the linker.
21
c7749bd6
AM
22if { !([istarget "i?86-*-elf*"]
23 || ([istarget "i?86-*-linux*"]
24 && ![istarget "*-*-*aout*"]
67a4f2b7
AO
25 && ![istarget "*-*-*oldld*"])
26 || [istarget "x86_64-*-linux*"]
27 || [istarget "amd64-*-linux*"]) } {
37e55690
JJ
28 return
29}
30
37e55690
JJ
31# List contains test-items with 3 items followed by 2 lists:
32# 0:name 1:ld options 2:assembler options
33# 3:filenames of assembler files 4: action and options. 5: name of output file
34
35# Actions:
36# objdump: Apply objdump options on result. Compare with regex (last arg).
37# nm: Apply nm options on result. Compare with regex (last arg).
38# readelf: Apply readelf options on result. Compare with regex (last arg).
39
40set i386tests {
41 {"TLS -fpic -shared transitions" "-shared -melf_i386"
42 "--32" {tlspic1.s tlspic2.s}
43 {{readelf -Ssrl tlspic.rd} {objdump -drj.text tlspic.dd}
44 {objdump -sj.got tlspic.sd} {objdump -sj.tdata tlspic.td}}
45 "libtlspic.so"}
67a4f2b7
AO
46 {"TLS descriptor -fpic -shared transitions" "-shared -melf_i386"
47 "--32" {tlsdesc.s tlspic2.s}
48 {{readelf -Ssrl tlsdesc.rd} {objdump -drj.text tlsdesc.dd}
49 {objdump "-s -j.got -j.got.plt" tlsdesc.sd} {objdump -sj.tdata tlsdesc.td}}
50 "libtlsdesc.so"}
37e55690
JJ
51 {"Helper shared library" "-shared -melf_i386"
52 "--32" {tlslib.s} {} "libtlslib.so"}
53 {"TLS -fpic and -fno-pic exec transitions"
54 "-melf_i386 tmpdir/libtlslib.so" "--32" {tlsbinpic.s tlsbin.s}
55 {{readelf -Ssrl tlsbin.rd} {objdump -drj.text tlsbin.dd}
56 {objdump -sj.got tlsbin.sd} {objdump -sj.tdata tlsbin.td}}
57 "tlsbin"}
67a4f2b7
AO
58 {"TLS descriptor -fpic and -fno-pic exec transitions"
59 "-melf_i386 tmpdir/libtlslib.so" "--32" {tlsbindesc.s tlsbin.s}
60 {{readelf -Ssrl tlsbindesc.rd} {objdump -drj.text tlsbindesc.dd}
61 {objdump -sj.got tlsbindesc.sd} {objdump -sj.tdata tlsbindesc.td}}
62 "tlsbindesc"}
37e55690
JJ
63 {"TLS -fno-pic -shared" "-shared -melf_i386"
64 "--32" {tlsnopic1.s tlsnopic2.s}
65 {{readelf -Ssrl tlsnopic.rd} {objdump -drj.text tlsnopic.dd}
66 {objdump -sj.got tlsnopic.sd}} "libtlsnopic.so"}
67a4f2b7
AO
67 {"TLS with global dynamic and descriptors"
68 "-shared -melf_i386" "--32" {tlsgdesc.s}
69 {{readelf -Ssrl tlsgdesc.rd} {objdump -drj.text tlsgdesc.dd}}
70 "libtlsgdesc.so"}
a45bb67d
JJ
71 {"TLS in debug sections" "-melf_i386"
72 "--32" {tlsg.s}
73 {{objdump -sj.debug_foobar tlsg.sd}} "tlsg"}
7c445aa3
JJ
74 {"TLS @indntpoff with %eax" "-melf_i386" "--32" {tlsindntpoff.s}
75 {{objdump -drj.text tlsindntpoff.dd}} "tlsindntpoff"}
4565652e
AM
76 {"Reloc section order" "-shared -melf_i386 -z nocombreloc" "--32"
77 {reloc.s} {{objdump -hw reloc.d}} "reloc.so"}
2030e6d7
JJ
78 {"-z combreloc relocation sections" "-shared -melf_i386 -z combreloc"
79 "--32" {combreloc.s} {{readelf -r combreloc.d}} "combreloc.so"}
37e55690
JJ
80}
81
37e55690 82run_ld_link_tests $i386tests
ac2aa337
JB
83
84run_dump_test "abs"
85run_dump_test "pcrel8"
86run_dump_test "pcrel16"
This page took 0.369662 seconds and 4 git commands to generate.