2000-11-13 H.J. Lu <hjl@gnu.org>
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 13 Nov 2000 21:36:14 +0000 (21:36 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 13 Nov 2000 21:36:14 +0000 (21:36 +0000)
* 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.

16 files changed:
gas/testsuite/ChangeLog
gas/testsuite/gas/symver/symver.exp [new file with mode: 0644]
gas/testsuite/gas/symver/symver0.d [new file with mode: 0644]
gas/testsuite/gas/symver/symver0.s [new file with mode: 0644]
gas/testsuite/gas/symver/symver1.d [new file with mode: 0644]
gas/testsuite/gas/symver/symver1.s [new file with mode: 0644]
gas/testsuite/gas/symver/symver2.l [new file with mode: 0644]
gas/testsuite/gas/symver/symver2.s [new file with mode: 0644]
gas/testsuite/gas/symver/symver3.l [new file with mode: 0644]
gas/testsuite/gas/symver/symver3.s [new file with mode: 0644]
gas/testsuite/gas/symver/symver4.l [new file with mode: 0644]
gas/testsuite/gas/symver/symver4.s [new file with mode: 0644]
gas/testsuite/gas/symver/symver5.l [new file with mode: 0644]
gas/testsuite/gas/symver/symver5.s [new file with mode: 0644]
gas/testsuite/gas/symver/symver6.l [new file with mode: 0644]
gas/testsuite/gas/symver/symver6.s [new file with mode: 0644]

index 704393a7d8c4922a7a46e2ac2840ab5b2faf4210..6867fd04dea28e2a027c44bb19de16aad841f99e 100644 (file)
@@ -1,3 +1,21 @@
+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.
diff --git a/gas/testsuite/gas/symver/symver.exp b/gas/testsuite/gas/symver/symver.exp
new file mode 100644 (file)
index 0000000..19d3551
--- /dev/null
@@ -0,0 +1,48 @@
+#
+# 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" ""
+}
diff --git a/gas/testsuite/gas/symver/symver0.d b/gas/testsuite/gas/symver/symver0.d
new file mode 100644 (file)
index 0000000..ec3609b
--- /dev/null
@@ -0,0 +1,6 @@
+#nm: -n
+#name: symver symver0
+
+         U foo@version1
+0+0000000 D foo1
+0+00000.. d L_foo1
diff --git a/gas/testsuite/gas/symver/symver0.s b/gas/testsuite/gas/symver/symver0.s
new file mode 100644 (file)
index 0000000..fa690f7
--- /dev/null
@@ -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/gas/testsuite/gas/symver/symver1.d b/gas/testsuite/gas/symver/symver1.d
new file mode 100644 (file)
index 0000000..e57266c
--- /dev/null
@@ -0,0 +1,9 @@
+#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
diff --git a/gas/testsuite/gas/symver/symver1.s b/gas/testsuite/gas/symver/symver1.s
new file mode 100644 (file)
index 0000000..c746c9a
--- /dev/null
@@ -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/gas/testsuite/gas/symver/symver2.l b/gas/testsuite/gas/symver/symver2.l
new file mode 100644 (file)
index 0000000..216b487
--- /dev/null
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*:8: Error: invalid attempt to declare external version name as default in symbol `foo@@version1'
diff --git a/gas/testsuite/gas/symver/symver2.s b/gas/testsuite/gas/symver/symver2.s
new file mode 100644 (file)
index 0000000..4b07d67
--- /dev/null
@@ -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/gas/testsuite/gas/symver/symver3.l b/gas/testsuite/gas/symver/symver3.l
new file mode 100644 (file)
index 0000000..4b3b5db
--- /dev/null
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*:6: Error: missing version name in `foo' for symbol `foo'
diff --git a/gas/testsuite/gas/symver/symver3.s b/gas/testsuite/gas/symver/symver3.s
new file mode 100644 (file)
index 0000000..336ea2e
--- /dev/null
@@ -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/gas/testsuite/gas/symver/symver4.l b/gas/testsuite/gas/symver/symver4.l
new file mode 100644 (file)
index 0000000..939ffa1
--- /dev/null
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*:6: Error: missing version name in `foo@' for symbol `foo'
diff --git a/gas/testsuite/gas/symver/symver4.s b/gas/testsuite/gas/symver/symver4.s
new file mode 100644 (file)
index 0000000..63d3595
--- /dev/null
@@ -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/gas/testsuite/gas/symver/symver5.l b/gas/testsuite/gas/symver/symver5.l
new file mode 100644 (file)
index 0000000..066ceba
--- /dev/null
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*:6: Error: missing version name in `foo@@@' for symbol `foo'
diff --git a/gas/testsuite/gas/symver/symver5.s b/gas/testsuite/gas/symver/symver5.s
new file mode 100644 (file)
index 0000000..13d4bae
--- /dev/null
@@ -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/gas/testsuite/gas/symver/symver6.l b/gas/testsuite/gas/symver/symver6.l
new file mode 100644 (file)
index 0000000..69468b4
--- /dev/null
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*:7: Error: multiple versions \[`foo@version1'|`foo@@version1'\] for symbol `foo'
diff --git a/gas/testsuite/gas/symver/symver6.s b/gas/testsuite/gas/symver/symver6.s
new file mode 100644 (file)
index 0000000..23d9fe2
--- /dev/null
@@ -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