* gas/symver/symver.exp: New for symver test.
* gas/symver/symver0.d: Likewise.
* gas/symver/symver0.s: Likewise.
* gas/symver/symver1.d: Likewise.
* gas/symver/symver1.s: Likewise.
* gas/symver/symver2.l: Likewise.
* gas/symver/symver2.s: Likewise.
* gas/symver/symver3.l: Likewise.
* gas/symver/symver3.s: Likewise.
* gas/symver/symver4.l: Likewise.
* gas/symver/symver4.s: Likewise.
* gas/symver/symver5.l: Likewise.
* gas/symver/symver5.s: Likewise.
* gas/symver/symver6.l: Likewise.
* gas/symver/symver6.s: Likewise.
+2000-11-13 H.J. Lu <hjl@gnu.org>
+
+ * gas/symver/symver.exp: New for symver test.
+ * gas/symver/symver0.d: Likewise.
+ * gas/symver/symver0.s: Likewise.
+ * gas/symver/symver1.d: Likewise.
+ * gas/symver/symver1.s: Likewise.
+ * gas/symver/symver2.l: Likewise.
+ * gas/symver/symver2.s: Likewise.
+ * gas/symver/symver3.l: Likewise.
+ * gas/symver/symver3.s: Likewise.
+ * gas/symver/symver4.l: Likewise.
+ * gas/symver/symver4.s: Likewise.
+ * gas/symver/symver5.l: Likewise.
+ * gas/symver/symver5.s: Likewise.
+ * gas/symver/symver6.l: Likewise.
+ * gas/symver/symver6.s: Likewise.
+
2000-11-11 Hans-Peter Nilsson <hp@bitrange.com>
* gas/macros/macros.exp: Mark strings test xfail for sh.
--- /dev/null
+#
+# 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 { ([istarget "*-*-elf*"]
+ || [istarget "*-*-linux*"])
+ && ![istarget *-*-linux*aout*]
+ && ![istarget *-*-linux*oldld*] } 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" ""
+ run_error_test "symver4" ""
+ run_error_test "symver5" ""
+ run_error_test "symver6" ""
+}
--- /dev/null
+#nm: -n
+#name: symver symver0
+
+ U foo@version1
+0+0000000 D foo1
+0+00000.. d L_foo1
--- /dev/null
+ .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
--- /dev/null
+#nm: -n
+#name: symver symver1
+
+ 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
--- /dev/null
+ .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
--- /dev/null
+.*: Assembler messages:
+.*:8: Error: invalid attempt to declare external version name as default in symbol `foo@@version1'
--- /dev/null
+ .data
+ .globl foo1
+ .type foo1,object
+foo1:
+ .long foo
+ .symver foo,foo@@version1
+L_foo1:
+ .size foo1,L_foo1-foo1
--- /dev/null
+.*: Assembler messages:
+.*:6: Error: missing version name in `foo' for symbol `foo'
--- /dev/null
+ .data
+ .globl foo1
+ .type foo1,object
+foo1:
+ .long foo
+ .symver foo,foo
+L_foo1:
+ .size foo1,L_foo1-foo1
--- /dev/null
+.*: Assembler messages:
+.*:6: Error: missing version name in `foo@' for symbol `foo'
--- /dev/null
+ .data
+ .globl foo1
+ .type foo1,object
+foo1:
+ .long foo
+ .symver foo,foo@
+L_foo1:
+ .size foo1,L_foo1-foo1
--- /dev/null
+.*: Assembler messages:
+.*:6: Error: missing version name in `foo@@@' for symbol `foo'
--- /dev/null
+ .data
+ .globl foo1
+ .type foo1,object
+foo1:
+ .long foo
+ .symver foo,foo@@@
+L_foo1:
+ .size foo1,L_foo1-foo1
--- /dev/null
+.*: Assembler messages:
+.*:7: Error: multiple versions \[`foo@version1'|`foo@@version1'\] for symbol `foo'
--- /dev/null
+ .data
+ .globl foo1
+ .type foo1,object
+foo1:
+ .long foo
+ .symver foo,foo@@version1
+ .symver foo,foo@version1
+L_foo1:
+ .size foo1,L_foo1-foo1