1 # Expect script for ld-xtensa tests
2 # Copyright (C) 2008-2019 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 "xtensa*-*-linux*"]) } {
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 {"TLS -shared transitions"
37 "-shared -melf32xtensa --hash-style=sysv" ""
38 "" {tlspic1.s tlspic2.s}
39 {{readelf -WSsrl tlspic.rd}
40 {objdump "-drj.text --start-address=0x350" tlspic.dd}
41 {objdump "-sj.text --stop-address=0x350" tlspic.sd}
42 {objdump -sj.tdata tlspic.td}}
44 {"Helper shared library" "-shared -melf32xtensa" ""
45 "" {tlslib.s} {} "libtlslib.so"}
46 {"TLS exec transitions"
47 "-melf32xtensa tmpdir/libtlslib.so --hash-style=sysv" ""
49 {{readelf -WSsrl tlsbin.rd}
50 {objdump "-drj.text --start-address=0x400238" tlsbin.dd}
51 {objdump "-sj.text --stop-address=0x400238" tlsbin.sd}
52 {objdump -sj.tdata tlsbin.td}}
56 run_ld_link_tests $xtensatests