1 # Copyright (C) 2012-2018 Free Software Foundation, Inc.
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
20 proc run_error_test { name opts } {
22 set testname "symver $name"
23 set file $srcdir/$subdir/$name
24 gas_run ${name}.s $opts ">&dump.out"
25 if { [regexp_diff "dump.out" "${file}.l"] } then {
27 verbose "output is [file_contents "dump.out"]" 2
33 # symver is only supported by ELF targets.
34 if { [is_elf_format] } then {
36 if {[istarget "ia64-*"]} then {
40 if {[istarget "hppa*64*-*-*"]} then {
44 # not supported by D30V
45 if {[istarget "d30v-*-*"]} {
49 run_dump_test "symver0"
50 run_dump_test "symver1"
51 run_error_test "symver2" ""
52 run_error_test "symver3" ""
53 # We have to comment out symver4 and symver5, which check the
54 # missing version name, since some tests in ld/testsuite/ld-elfvers
55 # have no version names. We cannot flag an error for the missing
57 # run_error_test "symver4" ""
58 # run_error_test "symver5" ""
59 run_error_test "symver6" ""