summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/gas/testsuite/gas/symver
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2014-06-13 12:38:00 -0700
committerAndrew Hsieh <andrewhsieh@google.com>2014-06-13 12:38:00 -0700
commit54f1b3cf509cd889905287cb8ce6c5ae33911a21 (patch)
treee39b1a7fa04db86a8215b7f9d4656d74e394aec0 /binutils-2.25/gas/testsuite/gas/symver
parent2a6558a8ecfb81d75215b4ec7dc61113e12cfd5f (diff)
downloadtoolchain_binutils-54f1b3cf509cd889905287cb8ce6c5ae33911a21.tar.gz
toolchain_binutils-54f1b3cf509cd889905287cb8ce6c5ae33911a21.tar.bz2
toolchain_binutils-54f1b3cf509cd889905287cb8ce6c5ae33911a21.zip
Add upstream binutils-2.25 snapshot 4/4 2014
For MIPS -mmsa support Change-Id: I08c4f002fa7b33dec85ed75956e6ab551bb03c96
Diffstat (limited to 'binutils-2.25/gas/testsuite/gas/symver')
-rw-r--r--binutils-2.25/gas/testsuite/gas/symver/symver.exp66
-rw-r--r--binutils-2.25/gas/testsuite/gas/symver/symver0.d10
-rw-r--r--binutils-2.25/gas/testsuite/gas/symver/symver0.s10
-rw-r--r--binutils-2.25/gas/testsuite/gas/symver/symver1.d13
-rw-r--r--binutils-2.25/gas/testsuite/gas/symver/symver1.s18
-rw-r--r--binutils-2.25/gas/testsuite/gas/symver/symver2.l2
-rw-r--r--binutils-2.25/gas/testsuite/gas/symver/symver2.s8
-rw-r--r--binutils-2.25/gas/testsuite/gas/symver/symver3.l2
-rw-r--r--binutils-2.25/gas/testsuite/gas/symver/symver3.s8
-rw-r--r--binutils-2.25/gas/testsuite/gas/symver/symver4.l2
-rw-r--r--binutils-2.25/gas/testsuite/gas/symver/symver4.s8
-rw-r--r--binutils-2.25/gas/testsuite/gas/symver/symver5.l2
-rw-r--r--binutils-2.25/gas/testsuite/gas/symver/symver5.s8
-rw-r--r--binutils-2.25/gas/testsuite/gas/symver/symver6.l2
-rw-r--r--binutils-2.25/gas/testsuite/gas/symver/symver6.s9
15 files changed, 168 insertions, 0 deletions
diff --git a/binutils-2.25/gas/testsuite/gas/symver/symver.exp b/binutils-2.25/gas/testsuite/gas/symver/symver.exp
new file mode 100644
index 00000000..9b6af4b4
--- /dev/null
+++ b/binutils-2.25/gas/testsuite/gas/symver/symver.exp
@@ -0,0 +1,66 @@
+# Copyright 2012
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+#
+# symver tests
+#
+proc run_error_test { name opts } {
+ global srcdir subdir
+ set testname "symver $name"
+ set file $srcdir/$subdir/$name
+ gas_run ${name}.s $opts ">&dump.out"
+ if { [regexp_diff "dump.out" "${file}.l"] } then {
+ fail $testname
+ verbose "output is [file_contents "dump.out"]" 2
+ return
+ }
+ pass $testname
+}
+
+# symver is only supported by ELF targets.
+if { [is_elf_format] } then {
+
+ if {[istarget "ia64-*"]} then {
+ return
+ }
+
+ if {[istarget "hppa*64*-*-*"]} then {
+ return
+ }
+
+ # not supported by D30V
+ if {[istarget "d30v-*-*"]} {
+ return
+ }
+
+ # not yet supported by i960
+ if {[istarget "i960-*-*"]} {
+ return
+ }
+
+ run_dump_test "symver0"
+ run_dump_test "symver1"
+ run_error_test "symver2" ""
+ run_error_test "symver3" ""
+ # We have to comment out symver4 and symver5, which check the
+ # missing version name, since some tests in ld/testsuite/ld-elfvers
+ # have no version names. We cannot flag an error for the missing
+ # version name.
+# run_error_test "symver4" ""
+# run_error_test "symver5" ""
+ run_error_test "symver6" ""
+}
diff --git a/binutils-2.25/gas/testsuite/gas/symver/symver0.d b/binutils-2.25/gas/testsuite/gas/symver/symver0.d
new file mode 100644
index 00000000..9ad6c88e
--- /dev/null
+++ b/binutils-2.25/gas/testsuite/gas/symver/symver0.d
@@ -0,0 +1,10 @@
+#nm: -n
+#name: symver symver0
+#
+# The #... and #pass are there to match extra symbols inserted by
+# some toolchains, eg arm-elf toolchain will add $d.
+
+[ ]+U foo@version1
+#...
+0+0000000 D foo1
+0+00000.. d L_foo1
diff --git a/binutils-2.25/gas/testsuite/gas/symver/symver0.s b/binutils-2.25/gas/testsuite/gas/symver/symver0.s
new file mode 100644
index 00000000..fa690f7e
--- /dev/null
+++ b/binutils-2.25/gas/testsuite/gas/symver/symver0.s
@@ -0,0 +1,10 @@
+ .data
+ .symver bar,bar@version1
+ .symver bar,bar@version1
+ .globl foo1
+ .type foo1,object
+foo1:
+ .long foo
+ .symver foo,foo@version1
+L_foo1:
+ .size foo1,L_foo1-foo1
diff --git a/binutils-2.25/gas/testsuite/gas/symver/symver1.d b/binutils-2.25/gas/testsuite/gas/symver/symver1.d
new file mode 100644
index 00000000..ab9b9495
--- /dev/null
+++ b/binutils-2.25/gas/testsuite/gas/symver/symver1.d
@@ -0,0 +1,13 @@
+#nm: -n
+#name: symver symver1
+#
+# The #... and #pass are there to match extra symbols inserted by
+# some toolchains, eg arm-elf toolchain will add $d.
+
+[ ]+U foo@version1
+#...
+0+0000000 D foo1@@version1
+0+00000.. d L_foo1
+0+00000.. D foo2
+0+00000.. D foo2@@version1
+0+00000.. d L_foo2
diff --git a/binutils-2.25/gas/testsuite/gas/symver/symver1.s b/binutils-2.25/gas/testsuite/gas/symver/symver1.s
new file mode 100644
index 00000000..c746c9a9
--- /dev/null
+++ b/binutils-2.25/gas/testsuite/gas/symver/symver1.s
@@ -0,0 +1,18 @@
+ .data
+ .symver bar,bar@@@version1
+ .symver bar,bar@@@version1
+ .globl foo1
+ .type foo1,object
+foo1:
+ .long foo
+ .symver foo,foo@@@version1
+ .symver foo1,foo1@@@version1
+L_foo1:
+ .size foo1,L_foo1-foo1
+ .globl foo2
+ .type foo2,object
+foo2:
+ .long foo
+ .symver foo2,foo2@@version1
+L_foo2:
+ .size foo2,L_foo2-foo2
diff --git a/binutils-2.25/gas/testsuite/gas/symver/symver2.l b/binutils-2.25/gas/testsuite/gas/symver/symver2.l
new file mode 100644
index 00000000..f9d73d76
--- /dev/null
+++ b/binutils-2.25/gas/testsuite/gas/symver/symver2.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*: Error: invalid attempt to declare external version name as default in symbol `foo@@version1'
diff --git a/binutils-2.25/gas/testsuite/gas/symver/symver2.s b/binutils-2.25/gas/testsuite/gas/symver/symver2.s
new file mode 100644
index 00000000..4b07d67b
--- /dev/null
+++ b/binutils-2.25/gas/testsuite/gas/symver/symver2.s
@@ -0,0 +1,8 @@
+ .data
+ .globl foo1
+ .type foo1,object
+foo1:
+ .long foo
+ .symver foo,foo@@version1
+L_foo1:
+ .size foo1,L_foo1-foo1
diff --git a/binutils-2.25/gas/testsuite/gas/symver/symver3.l b/binutils-2.25/gas/testsuite/gas/symver/symver3.l
new file mode 100644
index 00000000..4b3b5dba
--- /dev/null
+++ b/binutils-2.25/gas/testsuite/gas/symver/symver3.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*:6: Error: missing version name in `foo' for symbol `foo'
diff --git a/binutils-2.25/gas/testsuite/gas/symver/symver3.s b/binutils-2.25/gas/testsuite/gas/symver/symver3.s
new file mode 100644
index 00000000..336ea2e7
--- /dev/null
+++ b/binutils-2.25/gas/testsuite/gas/symver/symver3.s
@@ -0,0 +1,8 @@
+ .data
+ .globl foo1
+ .type foo1,object
+foo1:
+ .long foo
+ .symver foo,foo
+L_foo1:
+ .size foo1,L_foo1-foo1
diff --git a/binutils-2.25/gas/testsuite/gas/symver/symver4.l b/binutils-2.25/gas/testsuite/gas/symver/symver4.l
new file mode 100644
index 00000000..939ffa15
--- /dev/null
+++ b/binutils-2.25/gas/testsuite/gas/symver/symver4.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*:6: Error: missing version name in `foo@' for symbol `foo'
diff --git a/binutils-2.25/gas/testsuite/gas/symver/symver4.s b/binutils-2.25/gas/testsuite/gas/symver/symver4.s
new file mode 100644
index 00000000..63d3595f
--- /dev/null
+++ b/binutils-2.25/gas/testsuite/gas/symver/symver4.s
@@ -0,0 +1,8 @@
+ .data
+ .globl foo1
+ .type foo1,object
+foo1:
+ .long foo
+ .symver foo,foo@
+L_foo1:
+ .size foo1,L_foo1-foo1
diff --git a/binutils-2.25/gas/testsuite/gas/symver/symver5.l b/binutils-2.25/gas/testsuite/gas/symver/symver5.l
new file mode 100644
index 00000000..066cebab
--- /dev/null
+++ b/binutils-2.25/gas/testsuite/gas/symver/symver5.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*:6: Error: missing version name in `foo@@@' for symbol `foo'
diff --git a/binutils-2.25/gas/testsuite/gas/symver/symver5.s b/binutils-2.25/gas/testsuite/gas/symver/symver5.s
new file mode 100644
index 00000000..13d4baee
--- /dev/null
+++ b/binutils-2.25/gas/testsuite/gas/symver/symver5.s
@@ -0,0 +1,8 @@
+ .data
+ .globl foo1
+ .type foo1,object
+foo1:
+ .long foo
+ .symver foo,foo@@@
+L_foo1:
+ .size foo1,L_foo1-foo1
diff --git a/binutils-2.25/gas/testsuite/gas/symver/symver6.l b/binutils-2.25/gas/testsuite/gas/symver/symver6.l
new file mode 100644
index 00000000..69468b49
--- /dev/null
+++ b/binutils-2.25/gas/testsuite/gas/symver/symver6.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*:7: Error: multiple versions \[`foo@version1'|`foo@@version1'\] for symbol `foo'
diff --git a/binutils-2.25/gas/testsuite/gas/symver/symver6.s b/binutils-2.25/gas/testsuite/gas/symver/symver6.s
new file mode 100644
index 00000000..23d9fe20
--- /dev/null
+++ b/binutils-2.25/gas/testsuite/gas/symver/symver6.s
@@ -0,0 +1,9 @@
+ .data
+ .globl foo1
+ .type foo1,object
+foo1:
+ .long foo
+ .symver foo,foo@@version1
+ .symver foo,foo@version1
+L_foo1:
+ .size foo1,L_foo1-foo1