or1k: Support large plt_relocs when generating plt entries
[deliverable/binutils-gdb.git] / ld / testsuite / ld-or1k / or1k.exp
CommitLineData
1c4f3780 1# Expect script for ld-or1k tests
250d07de 2# Copyright (C) 2015-2021 Free Software Foundation, Inc.
1c4f3780
RH
3#
4# This file is part of the GNU Binutils.
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 3 of the License, or
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
18# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19# MA 02110-1301, USA.
20#
21
22if { ![istarget "or1k*-*-*"] } {
23 return
24}
25
26# List contains test-items with 3 items followed by 2 lists:
27# 0:name 1:ld early options 2:ld late options 3:assembler options
28# 4:filenames of assembler files 5: action and options. 6: name of output file
29
30# Actions:
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).
34
35set or1ktests {
36 {"offsets1" "" "" "" {offsets1.s}
37 {{objdump -drj.text offsets1.d}}
38 "offsets1"}
39}
40
c8e98e36
SH
41set or1kplttests {
42 {"PLTA -fpic -shared" "-fpic -shared" ""
43 "" {plta1.s}
44 {{objdump -dr plta1.dd}}
45 "libplta1.so"}
46 {"PLT -fpic -shared" "-fpic -shared" ""
47 "" {plt1.s}
48 {{objdump -dr plt1.dd}}
49 "libplt1.so"}
50 {"Helper shared library" "-fpic -shared" ""
51 "" {pltlib.s} {} "libpltlib.so"}
52 {"PLT -fno-pic exec -relax" "-relax tmpdir/libpltlib.so" ""
53 "" {plt1.s}
54 {{objdump -dr plt1.x.dd}}
55 "plt1.x"}
284a1309
SH
56 {"gotha exec plt" "tmpdir/libpltlib.so" ""
57 "" {gotha1.s}
58 {{objdump -dr gotha1.dd}}
59 "gotha1.x"}
60 {"gotha -fpic -shared" "-fpic -shared" ""
61 "" {gotha2.s}
62 {{objdump -dr gotha2.dd}}
63 "gotha2.x"}
c8e98e36
SH
64}
65
1c4f3780
RH
66# Not implemented yet
67# {"TLS -fpic -shared" "-shared -melf64alpha" ""
68# "" {align.s tlspic1.s tlspic2.s}
69# {{readelf -WSsrl tlspic.rd} {objdump -drj.text tlspic.dd}
70# {objdump -sj.got tlspic.sd} {objdump -sj.tdata tlspic.td}}
71# "libtlspic.so"}
72# {"Helper shared library" "-shared -melf64alpha" ""
73# "" {tlslib.s} {} "libtlslib.so"}
74# {"TLS -fpic and -fno-pic exec"
75# "-melf64alpha tmpdir/libtlslib.so" "" "" {align.s tlsbinpic.s tlsbin.s}
76# {{readelf -WSsrl tlsbin.rd} {objdump -drj.text tlsbin.dd}
77# {objdump -sj.got tlsbin.sd} {objdump -sj.tdata tlsbin.td}}
78# "tlsbin"}
79# {"TLS -fpic and -fno-pic exec -relax"
80# "-relax -melf64alpha tmpdir/libtlslib.so" ""
81# "" {align.s tlsbinpic.s tlsbin.s}
82# {{readelf -WSsrl tlsbinr.rd} {objdump -drj.text tlsbinr.dd}
83# {objdump -sj.got tlsbinr.sd}}
84# "tlsbinr"}
85# {"empty got"
86# "-melf64alpha" "" ""
87# {emptygot.s}
88# {{nm "-n" emptygot.nm}}
89# "emptygot"}
90# {"TLS in debug sections" "-melf64alpha" ""
91# "" {tlsg.s}
92# {{objdump -sj.debug_foobar tlsg.sd}} "tlsg"}
93
c8e98e36 94# Shared objects not supported on newlib
1c4f3780 95run_ld_link_tests $or1ktests
c8e98e36
SH
96if { ![istarget "or1k*-*-elf*"] } {
97 run_ld_link_tests $or1kplttests
98 return
99}
This page took 0.235018 seconds and 4 git commands to generate.