1 |
205 |
julius |
# Expect script for ld-xtensa tests
|
2 |
|
|
# Copyright (C) 2008 Free Software Foundation
|
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 |
|
|
|
22 |
|
|
if { !([istarget "xtensa*-*-linux*"]) } {
|
23 |
|
|
return
|
24 |
|
|
}
|
25 |
|
|
|
26 |
|
|
# List contains test-items with 3 items followed by 2 lists:
|
27 |
|
|
# 0:name 1:ld options 2:assembler options
|
28 |
|
|
# 3:filenames of assembler files 4: action and options. 5: 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 |
|
|
|
35 |
|
|
set xtensatests {
|
36 |
|
|
{"TLS -shared transitions"
|
37 |
|
|
"-shared -melf32xtensa" "" {tlspic1.s tlspic2.s}
|
38 |
|
|
{{readelf -WSsrl tlspic.rd}
|
39 |
|
|
{objdump "-drj.text --start-address=0x350" tlspic.dd}
|
40 |
|
|
{objdump "-sj.text --stop-address=0x350" tlspic.sd}
|
41 |
|
|
{objdump -sj.tdata tlspic.td}}
|
42 |
|
|
"libtlspic.so"}
|
43 |
|
|
{"Helper shared library" "-shared -melf32xtensa"
|
44 |
|
|
"" {tlslib.s} {} "libtlslib.so"}
|
45 |
|
|
{"TLS exec transitions"
|
46 |
|
|
"-melf32xtensa tmpdir/libtlslib.so" "" {tlsbin.s}
|
47 |
|
|
{{readelf -WSsrl tlsbin.rd}
|
48 |
|
|
{objdump "-drj.text --start-address=0x400238" tlsbin.dd}
|
49 |
|
|
{objdump "-sj.text --stop-address=0x400238" tlsbin.sd}
|
50 |
|
|
{objdump -sj.tdata tlsbin.td}}
|
51 |
|
|
"tlsbin"}
|
52 |
|
|
}
|
53 |
|
|
|
54 |
|
|
run_ld_link_tests $xtensatests
|