1 # Expect script for ld-or1k tests
2 # Copyright (C) 2015 Free Software Foundation, Inc.
4 # This file is part of the GNU Binutils.
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.
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.
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,
22 if { ![istarget "or1k*-*-*"] } {
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
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 {"offsets1" "" "" "" {offsets1.s}
37 {{objdump -drj.text offsets1.d}}
42 # {"TLS -fpic -shared" "-shared -melf64alpha" ""
43 # "" {align.s tlspic1.s tlspic2.s}
44 # {{readelf -WSsrl tlspic.rd} {objdump -drj.text tlspic.dd}
45 # {objdump -sj.got tlspic.sd} {objdump -sj.tdata tlspic.td}}
47 # {"Helper shared library" "-shared -melf64alpha" ""
48 # "" {tlslib.s} {} "libtlslib.so"}
49 # {"TLS -fpic and -fno-pic exec"
50 # "-melf64alpha tmpdir/libtlslib.so" "" "" {align.s 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}}
54 # {"TLS -fpic and -fno-pic exec -relax"
55 # "-relax -melf64alpha tmpdir/libtlslib.so" ""
56 # "" {align.s tlsbinpic.s tlsbin.s}
57 # {{readelf -WSsrl tlsbinr.rd} {objdump -drj.text tlsbinr.dd}
58 # {objdump -sj.got tlsbinr.sd}}
61 # "-melf64alpha" "" ""
63 # {{nm "-n" emptygot.nm}}
65 # {"TLS in debug sections" "-melf64alpha" ""
67 # {{objdump -sj.debug_foobar tlsg.sd}} "tlsg"}
69 run_ld_link_tests $or1ktests