diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2005-11-04 19:45:25 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2005-11-04 19:45:25 +0000 |
commit | b54788f893981969adb5e98b9e1dbe9588dc0cfd (patch) | |
tree | 166f33af95b065b288b7045abf8ade0aa8426319 /gas | |
parent | 384a9dda99bba1f6e95e154df7450b580a2453e3 (diff) | |
download | gdb-b54788f893981969adb5e98b9e1dbe9588dc0cfd.zip gdb-b54788f893981969adb5e98b9e1dbe9588dc0cfd.tar.gz gdb-b54788f893981969adb5e98b9e1dbe9588dc0cfd.tar.bz2 |
gas/ChangeLog:
* read.c (s_weakref): Do not permit redefinitions.
* symbols.c (colon): Do not permit redefinitions of equated
symbols.
gas/testsuite/ChangeLog:
* gas/all/gas.exp: Remove weakref xfail. Run weakref4.s.
* gas/all/weakref1.s: Move redefinition bits to...
* gas/all/weakref4.s: ... new file.
* gas/all/weakref1.d: Remove command moved to weakref1u. Adjust
remaining command for leading tabs. Regenerate.
* gas/all/weakref1l.d: Regenerate.
* gas/all/weakref1u.d: Likewise.
* gas/all/wealref1w.d: Likewise.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/read.c | 8 | ||||
-rw-r--r-- | gas/symbols.c | 3 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | gas/testsuite/gas/all/gas.exp | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/all/weakref1.d | 18 | ||||
-rw-r--r-- | gas/testsuite/gas/all/weakref1.s | 45 | ||||
-rw-r--r-- | gas/testsuite/gas/all/weakref1l.d | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/all/weakref1u.d | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/all/weakref1w.d | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/all/weakref4.s | 45 |
11 files changed, 74 insertions, 88 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 0dabaeb..9313163 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2005-11-04 Alexandre Oliva <aoliva@redhat.com> + + * read.c (s_weakref): Do not permit redefinitions. + * symbols.c (colon): Do not permit redefinitions of equated + symbols. + 2005-11-01 Thiemo Seufer <ths@networkno.de> PR gas/1299 @@ -3178,6 +3178,14 @@ s_weakref (int ignore ATTRIBUTE_UNUSED) symbolP = symbol_find_or_make (name); + if (S_IS_DEFINED (symbolP) || symbol_equated_p (symbolP)) + { + as_bad (_("symbol `%s' is already defined"), name); + *end_name = delim; + ignore_rest_of_line (); + return; + } + *end_name = delim; SKIP_WHITESPACE (); diff --git a/gas/symbols.c b/gas/symbols.c index c42cd7c..e8c110c 100644 --- a/gas/symbols.c +++ b/gas/symbols.c @@ -332,7 +332,8 @@ colon (/* Just seen "x:" - rattle symbols & frags. */ local_symbol_set_frag (locsym, frag_now); locsym->lsy_value = frag_now_fix (); } - else if (!S_IS_DEFINED (symbolP) || S_IS_COMMON (symbolP)) + else if (!(S_IS_DEFINED (symbolP) || symbol_equated_p (symbolP)) + || S_IS_COMMON (symbolP)) { if (S_GET_VALUE (symbolP) == 0) { diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 5c11687..b21d2cf 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2005-11-04 Alexandre Oliva <aoliva@redhat.com> + + * gas/all/gas.exp: Remove weakref xfail. Run weakref4.s. + * gas/all/weakref1.s: Move redefinition bits to... + * gas/all/weakref4.s: ... new file. + * gas/all/weakref1.d: Remove command moved to weakref1u. Adjust + remaining command for leading tabs. Regenerate. + * gas/all/weakref1l.d: Regenerate. + * gas/all/weakref1u.d: Likewise. + * gas/all/wealref1w.d: Likewise. + 2005-11-04 Jan Beulich <jbeulich@novell.com> * gas/all/gas.exp: xfail weakref dump tests for all targets. diff --git a/gas/testsuite/gas/all/gas.exp b/gas/testsuite/gas/all/gas.exp index e56f73c..0c7e4df 100644 --- a/gas/testsuite/gas/all/gas.exp +++ b/gas/testsuite/gas/all/gas.exp @@ -256,20 +256,16 @@ if { ![istarget "i960-*-*"] } { case $target_triplet in { { z80-*-* } { } default { - setup_xfail *-*-* run_dump_test weakref1 - setup_xfail *-*-* run_dump_test weakref1g - setup_xfail *-*-* run_dump_test weakref1l - setup_xfail *-*-* run_dump_test weakref1u - setup_xfail *-*-* run_dump_test weakref1w } } gas_test_error "weakref2.s" "" "e: would close weakref loop: e => a => b => c => d => e" gas_test_error "weakref3.s" "" "a: would close weakref loop: a => b => c => d => e => a" +gas_test_error "weakref4.s" "" "is already defined" load_lib gas-dg.exp dg-init diff --git a/gas/testsuite/gas/all/weakref1.d b/gas/testsuite/gas/all/weakref1.d index 7520b86..ab8f484 100644 --- a/gas/testsuite/gas/all/weakref1.d +++ b/gas/testsuite/gas/all/weakref1.d @@ -11,9 +11,7 @@ OFFSET +TYPE +VALUE * # the rest of this file is generated with the following script: # # script begin # echo \#... -# sed -n 's:^\.weakref .*, \(\(u\|\(w\)\).*\)$:.*( \3 |\(sec 0\)).* \1:p' weakref1.s | uniq | while read line; do echo "$line"; echo "#..."; done - -# sed -n 's:^\.long \(W\|\)\(.*[^a-z]\)[a-z]*\(\| - .*\)$:\2:p' weakref1.s | sed -e 's,^[lg].*,(&|\\.text)(\\+0x[0-9a-f]+)?,' | sed 's,^,[0-9a-f]+ [^ ]* +,' +# sed -n 's:^[ ]*\.long \(W\|\)\(.*[^a-z]\)[a-z]*\(\| - .*\)$:\2:p' weakref1.s | sed -e 's,^[lg].*,(&|\\.text)(\\+0x[0-9a-f]+)?,' | sed 's,^,[0-9a-f]+ [^ ]* +,' # # script output: #... [0-9a-f]+ [^ ]* +wa1 @@ -71,8 +69,6 @@ OFFSET +TYPE +VALUE * [0-9a-f]+ [^ ]* +ww9 [0-9a-f]+ [^ ]* +ww10 [0-9a-f]+ [^ ]* +ww10 -[0-9a-f]+ [^ ]* +um2 -[0-9a-f]+ [^ ]* +wm3 [0-9a-f]+ [^ ]* +um5 [0-9a-f]+ [^ ]* +wm6 [0-9a-f]+ [^ ]* +wm7 @@ -87,18 +83,6 @@ OFFSET +TYPE +VALUE * [0-9a-f]+ [^ ]* +uh8 [0-9a-f]+ [^ ]* +uh9 [0-9a-f]+ [^ ]* +uh9 -[0-9a-f]+ [^ ]* +(lr1|\.text)(\+0x[0-9a-f]+)? -[0-9a-f]+ [^ ]* +(lr1|\.text)(\+0x[0-9a-f]+)? -[0-9a-f]+ [^ ]* +(lr2|\.text)(\+0x[0-9a-f]+)? -[0-9a-f]+ [^ ]* +(lr2|\.text)(\+0x[0-9a-f]+)? -[0-9a-f]+ [^ ]* +wr3 -[0-9a-f]+ [^ ]* +wr3 -[0-9a-f]+ [^ ]* +wr4 -[0-9a-f]+ [^ ]* +wr5 -[0-9a-f]+ [^ ]* +(lr6|\.text)(\+0x[0-9a-f]+)? -[0-9a-f]+ [^ ]* +ur6 -[0-9a-f]+ [^ ]* +(lr7|\.text)(\+0x[0-9a-f]+)? -[0-9a-f]+ [^ ]* +(lr7|\.text)(\+0x[0-9a-f]+)? [0-9a-f]+ [^ ]* +(ld1|\.text)(\+0x[0-9a-f]+)? [0-9a-f]+ [^ ]* +(ld2|\.text)(\+0x[0-9a-f]+)? [0-9a-f]+ [^ ]* +(ld3|\.text)(\+0x[0-9a-f]+)? diff --git a/gas/testsuite/gas/all/weakref1.s b/gas/testsuite/gas/all/weakref1.s index e95e4f4..d1fd763 100644 --- a/gas/testsuite/gas/all/weakref1.s +++ b/gas/testsuite/gas/all/weakref1.s @@ -126,17 +126,6 @@ l: .weak ww10 /* m# test multiple weakrefs */ - .weakref Wnm1, nm1 - .weakref Wnm1, nm1 - - .weakref Wum2, um2 - .weakref Wum2, um2 - .long um2 - - .weakref Wwm3, wm3 - .weakref Wwm3, wm3 - .long Wwm3 - .weakref Wnm4a, nm4 .weakref Wnm4b, nm4 @@ -197,40 +186,6 @@ l: .weakref Wuh9a, uh9 .long uh9 -/* r# weakref redefinitions, to and from */ - .weakref lr1, nr1 - .long lr1 - .set lr1, l - .long lr1 - - .long lr2 - .weakref lr2, nr2 - .set lr2, l - .long lr2 - - .set Wwr3, l - .long Wwr3 - .weakref Wwr3, wr3 - .long Wwr3 - - .set Wwr4, l - .weakref Wwr4, wr4 - .long Wwr4 - - .set Wwr5, l - .long Wwr5 - .weakref Wwr5, wr5 - - .weakref lr6, ur6 - .long lr6 - .set lr6, l - .long ur6 - - .weakref lr7, nr7 - .long lr7 -lr7: - .long lr7 - /* d# target symbol definitions */ .weakref Wld1, ld1 .long Wld1 diff --git a/gas/testsuite/gas/all/weakref1l.d b/gas/testsuite/gas/all/weakref1l.d index 177d1f7..7d92578 100644 --- a/gas/testsuite/gas/all/weakref1l.d +++ b/gas/testsuite/gas/all/weakref1l.d @@ -13,14 +13,6 @@ #... .* t l #... -.* t lr1 -#... -.* t lr2 -#... -.* t lr6 -#... -.* t lr7 -#... .* t ld1 #... .* t ld2 diff --git a/gas/testsuite/gas/all/weakref1u.d b/gas/testsuite/gas/all/weakref1u.d index f88f73a..e46c196 100644 --- a/gas/testsuite/gas/all/weakref1u.d +++ b/gas/testsuite/gas/all/weakref1u.d @@ -39,15 +39,11 @@ #... .* U uc9 #... -.* U um2 -#... .* U um5 #... .* U uh8 #... .* U uh9 #... -.* U ur6 -#... .* U ud5 #pass diff --git a/gas/testsuite/gas/all/weakref1w.d b/gas/testsuite/gas/all/weakref1w.d index 196e6a2..d5ddb88 100644 --- a/gas/testsuite/gas/all/weakref1w.d +++ b/gas/testsuite/gas/all/weakref1w.d @@ -36,8 +36,6 @@ #... .* w ww10 #... -.* w wm3 -#... .* w wm6 #... .* w wm7 @@ -55,10 +53,4 @@ .* w wh6 #... .* w wh7 -#... -.* w wr3 -#... -.* w wr4 -#... -.* w wr5 #pass diff --git a/gas/testsuite/gas/all/weakref4.s b/gas/testsuite/gas/all/weakref4.s new file mode 100644 index 0000000..b984c64 --- /dev/null +++ b/gas/testsuite/gas/all/weakref4.s @@ -0,0 +1,45 @@ +/* m# test multiple weakrefs */ + .weakref Wnm1, nm1 + .weakref Wnm1, nm1 + + .weakref Wum2, um2 + .weakref Wum2, um2 + .long um2 + + .weakref Wwm3, wm3 + .weakref Wwm3, wm3 + .long Wwm3 + +/* r# weakref redefinitions, to and from */ + .weakref lr1, nr1 + .long lr1 + .set lr1, l + .long lr1 + + .long lr2 + .weakref lr2, nr2 + .set lr2, l + .long lr2 + + .set Wwr3, l + .long Wwr3 + .weakref Wwr3, wr3 + .long Wwr3 + + .set Wwr4, l + .weakref Wwr4, wr4 + .long Wwr4 + + .set Wwr5, l + .long Wwr5 + .weakref Wwr5, wr5 + + .weakref lr6, ur6 + .long lr6 + .set lr6, l + .long ur6 + + .weakref lr7, nr7 + .long lr7 +lr7: + .long lr7 |