Add copyright notices
[deliverable/binutils-gdb.git] / gas / testsuite / gas / symver / symver.exp
1 # Copyright 2012
2 # Free Software Foundation, Inc.
3
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
17
18 #
19 # symver tests
20 #
21 proc run_error_test { name opts } {
22 global srcdir subdir
23 set testname "symver $name"
24 set file $srcdir/$subdir/$name
25 gas_run ${name}.s $opts ">&dump.out"
26 if { [regexp_diff "dump.out" "${file}.l"] } then {
27 fail $testname
28 verbose "output is [file_contents "dump.out"]" 2
29 return
30 }
31 pass $testname
32 }
33
34 # symver is only supported by ELF targets.
35 if { [is_elf_format] } then {
36
37 if {[istarget "ia64-*"]} then {
38 return
39 }
40
41 if {[istarget "hppa*64*-*-*"]} then {
42 return
43 }
44
45 # not supported by D30V
46 if {[istarget "d30v-*-*"]} {
47 return
48 }
49
50 # not yet supported by i960
51 if {[istarget "i960-*-*"]} {
52 return
53 }
54
55 run_dump_test "symver0"
56 run_dump_test "symver1"
57 run_error_test "symver2" ""
58 run_error_test "symver3" ""
59 # We have to comment out symver4 and symver5, which check the
60 # missing version name, since some tests in ld/testsuite/ld-elfvers
61 # have no version names. We cannot flag an error for the missing
62 # version name.
63 # run_error_test "symver4" ""
64 # run_error_test "symver5" ""
65 run_error_test "symver6" ""
66 }
This page took 0.030234 seconds and 4 git commands to generate.