diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2000-11-13 21:36:14 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2000-11-13 21:36:14 +0000 |
commit | 747e13a0ce23b0dccc5c98ba2cc7c6111c9f6ecf (patch) | |
tree | 085b30e1de5caf2b2f7d7c7860c47740fa635331 /gas | |
parent | 79082ff0c6032d8e1e832fe35cc69b3b46d4bd91 (diff) | |
download | gdb-747e13a0ce23b0dccc5c98ba2cc7c6111c9f6ecf.zip gdb-747e13a0ce23b0dccc5c98ba2cc7c6111c9f6ecf.tar.gz gdb-747e13a0ce23b0dccc5c98ba2cc7c6111c9f6ecf.tar.bz2 |
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.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/testsuite/ChangeLog | 18 | ||||
-rw-r--r-- | gas/testsuite/gas/symver/symver.exp | 48 | ||||
-rw-r--r-- | gas/testsuite/gas/symver/symver0.d | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/symver/symver0.s | 10 | ||||
-rw-r--r-- | gas/testsuite/gas/symver/symver1.d | 9 | ||||
-rw-r--r-- | gas/testsuite/gas/symver/symver1.s | 18 | ||||
-rw-r--r-- | gas/testsuite/gas/symver/symver2.l | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/symver/symver2.s | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/symver/symver3.l | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/symver/symver3.s | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/symver/symver4.l | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/symver/symver4.s | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/symver/symver5.l | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/symver/symver5.s | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/symver/symver6.l | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/symver/symver6.s | 9 |
16 files changed, 160 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 704393a..6867fd0 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -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 index 0000000..19d3551 --- /dev/null +++ b/gas/testsuite/gas/symver/symver.exp @@ -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 index 0000000..ec3609b --- /dev/null +++ b/gas/testsuite/gas/symver/symver0.d @@ -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 index 0000000..fa690f7 --- /dev/null +++ b/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/gas/testsuite/gas/symver/symver1.d b/gas/testsuite/gas/symver/symver1.d new file mode 100644 index 0000000..e57266c --- /dev/null +++ b/gas/testsuite/gas/symver/symver1.d @@ -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 index 0000000..c746c9a --- /dev/null +++ b/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/gas/testsuite/gas/symver/symver2.l b/gas/testsuite/gas/symver/symver2.l new file mode 100644 index 0000000..216b487 --- /dev/null +++ b/gas/testsuite/gas/symver/symver2.l @@ -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 index 0000000..4b07d67 --- /dev/null +++ b/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/gas/testsuite/gas/symver/symver3.l b/gas/testsuite/gas/symver/symver3.l new file mode 100644 index 0000000..4b3b5db --- /dev/null +++ b/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/gas/testsuite/gas/symver/symver3.s b/gas/testsuite/gas/symver/symver3.s new file mode 100644 index 0000000..336ea2e --- /dev/null +++ b/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/gas/testsuite/gas/symver/symver4.l b/gas/testsuite/gas/symver/symver4.l new file mode 100644 index 0000000..939ffa1 --- /dev/null +++ b/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/gas/testsuite/gas/symver/symver4.s b/gas/testsuite/gas/symver/symver4.s new file mode 100644 index 0000000..63d3595 --- /dev/null +++ b/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/gas/testsuite/gas/symver/symver5.l b/gas/testsuite/gas/symver/symver5.l new file mode 100644 index 0000000..066ceba --- /dev/null +++ b/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/gas/testsuite/gas/symver/symver5.s b/gas/testsuite/gas/symver/symver5.s new file mode 100644 index 0000000..13d4bae --- /dev/null +++ b/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/gas/testsuite/gas/symver/symver6.l b/gas/testsuite/gas/symver/symver6.l new file mode 100644 index 0000000..69468b4 --- /dev/null +++ b/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/gas/testsuite/gas/symver/symver6.s b/gas/testsuite/gas/symver/symver6.s new file mode 100644 index 0000000..23d9fe2 --- /dev/null +++ b/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 |