]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - ld/testsuite/ld-sh/sh-vxworks.exp
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / ld / testsuite / ld-sh / sh-vxworks.exp
CommitLineData
f96b4a7b 1# Expect script for VxWorks targeted SH linker tests
250d07de 2# Copyright (C) 2006-2021 Free Software Foundation, Inc.
f96b4a7b
NC
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
55e6e397
RS
21if { ![istarget "sh-*-vxworks"] } {
22 return
23}
24
25set endians { "--big" "-EB" "" "--little" "-EL" "-le" }
26
27foreach { gas_option ld_option suffix } $endians {
28 set vxworkstests {
bab55c05
AM
29 {"VxWorks shared library test 1"
30 "-shared -Tvxworks1.ld --hash-style=sysv $ld_option" ""
55e6e397
RS
31 "$gas_option" {vxworks1-lib.s}
32 {{readelf --relocs vxworks1-lib.rd}
33 {objdump -dr vxworks1-lib$suffix.dd}
e68ed250 34 {readelf --symbols vxworks1-lib.nd} {readelf -d vxworks1-lib.td}}
55e6e397
RS
35 "libvxworks1.so"}
36 {"VxWorks executable test 1 (dynamic)" \
bab55c05 37 "tmpdir/libvxworks1.so -Tvxworks1.ld --hash-style=sysv -q --force-dynamic $ld_option" ""
55e6e397 38 "$gas_option" {vxworks1.s}
b657622c 39 {{readelf {--relocs --wide} vxworks1.rd} {objdump -dr vxworks1$suffix.dd}}
55e6e397
RS
40 "vxworks1"}
41 {"VxWorks executable test 2 (dynamic)" \
bab55c05 42 "-Tvxworks1.ld --hash-style=sysv -q --force-dynamic $ld_option" ""
55e6e397
RS
43 "$gas_option" {vxworks2.s}
44 {{readelf --segments vxworks2.sd}}
45 "vxworks2"}
46 {"VxWorks executable test 2 (static)"
bab55c05 47 "-Tvxworks1.ld --hash-style=sysv $ld_option" ""
55e6e397
RS
48 "$gas_option" {vxworks2.s}
49 {{readelf --segments vxworks2-static.sd}}
50 "vxworks2"}
bab55c05
AM
51 {"VxWorks shared library test 3"
52 "-shared -Tvxworks1.ld --hash-style=sysv $ld_option" ""
55e6e397
RS
53 "$gas_option" {vxworks3-lib.s}
54 {{objdump -dr vxworks3-lib$suffix.dd}}
55 "libvxworks3.so"}
56 {"VxWorks executable test 3 (dynamic)" \
bab55c05 57 "tmpdir/libvxworks3.so -Tvxworks1.ld --hash-style=sysv -q --force-dynamic $ld_option" ""
55e6e397
RS
58 "$gas_option" {vxworks3.s}
59 {{objdump -d vxworks3$suffix.dd}}
60 "vxworks3"}
61 }
62 run_ld_link_tests [subst $vxworkstests]
63}
64run_dump_test "vxworks1-static"