1 # Copyright (C) 2012-2020 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 set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
50 foreach t $test_list {
51 # We need to strip the ".d", but can leave the dirname.
52 verbose [file rootname $t]
53 run_dump_test [file rootname $t]
56 run_error_test "symver2" ""
57 run_error_test "symver3" ""
58 # We have to comment out symver4 and symver5, which check the
59 # missing version name, since some tests in ld/testsuite/ld-elfvers
60 # have no version names. We cannot flag an error for the missing
62 # run_error_test "symver4" ""
63 # run_error_test "symver5" ""
64 run_error_test "symver14" ""
65 run_error_test "symver15" ""