From: H.J. Lu Date: Mon, 13 Nov 2000 21:36:14 +0000 (+0000) Subject: 2000-11-13 H.J. Lu X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=747e13a0ce23b0dccc5c98ba2cc7c6111c9f6ecf;p=binutils-gdb.git 2000-11-13 H.J. Lu * 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. --- diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 704393a7d8c..6867fd04dea 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,21 @@ +2000-11-13 H.J. Lu + + * 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 * 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 00000000000..19d3551692f --- /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 00000000000..ec3609bf9bf --- /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 00000000000..fa690f7eab0 --- /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 00000000000..e57266c492e --- /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 00000000000..c746c9a99fa --- /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 00000000000..216b4870b6b --- /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 00000000000..4b07d67bcc9 --- /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 00000000000..4b3b5dbaa5b --- /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 00000000000..336ea2e7067 --- /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 00000000000..939ffa15cb7 --- /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 00000000000..63d3595f3a3 --- /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 00000000000..066cebab652 --- /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 00000000000..13d4baee24d --- /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 00000000000..69468b49398 --- /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 00000000000..23d9fe20ee4 --- /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