diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2005-10-24 17:51:42 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2005-10-24 17:51:42 +0000 |
commit | 06e77878ef2b6a57ef92c1691b3aeb668dc248ba (patch) | |
tree | 5bb8d868d5530589690a1e248422257110dea2b3 /gas/testsuite | |
parent | 9ba4c445137e7c387090441e2837e09479f14457 (diff) | |
download | gdb-06e77878ef2b6a57ef92c1691b3aeb668dc248ba.zip gdb-06e77878ef2b6a57ef92c1691b3aeb668dc248ba.tar.gz gdb-06e77878ef2b6a57ef92c1691b3aeb668dc248ba.tar.bz2 |
gas/ChangeLog:
* read.c (potable): Add weakref.
(s_weakref): New.
* read.h (s_weakref): Declare.
* struc-symbol.h (struct symbol): Add sy_weakrefr and sy_weakrefd.
* symbols.c (colon): Clear weakrefr.
(symbol_find_exact): Rename to, and reimplement in terms of...
(symbol_find_exact_noref): ... new function.
(symbol_find): Likewise...
(symbol_find_noref): ... ditto.
(resolve_symbol_value): Resolve weakrefr without setting their
values.
(S_SET_WEAK): Call hook.
(S_GET_VALUE): Follow weakref link.
(S_SET_VALUE): Clear weakrefr.
(S_IS_WEAK): Follow weakref link.
(S_IS_WEAKREFR, S_SET_WEAKREFR, S_CLEAR_WEAKREFR): New.
(S_IS_WEAKREFD, S_SET_WEAKREFD, S_CLEAR_WEAKREFD): New.
(symbol_set_value_expression, symbol_set_frag): Clear weakrefr.
(symbol_mark_used): Follow weakref link.
(print_symbol_value_1): Print weak, weakrefr and weakrefd.
* symbols.h (symbol_find_noref, symbol_find_exact_noref): Declare.
(S_IS_WEAKREFR, S_SET_WEAKREFR, S_CLEAR_WEAKREFR): Declare.
(S_IS_WEAKREFD, S_SET_WEAKREFD, S_CLEAR_WEAKREFD): Declare.
* write.c (adust_reloc_syms): Follow weakref link. Do not
complain if target is undefined.
(write_object_file): Likewise. Remove weakrefr symbols. Drop
unreferenced weakrefd symbols.
* config/obj-coff.c (obj_frob_symbol): Do not force WEAKREFD
symbols EXTERNAL.
(pecoff_obj_set_weak_hook, pecoff_obj_clear_weak_hook): New.
* config/obj-coff.h (obj_set_weak_hook, obj_clear_weak_hook): Define.
* doc/as.texinfo: Document weakref.
* doc/internals.texi: Document new struct members, internal
functions and hooks.
gas/testsuite/ChangeLog:
* gas/all/weakref1.s, gas/all/weakref1.d: New test.
* gas/all/weakref1g.d, gas/all/weakref1l.d: New tests.
* gas/all/weakref1u.d, gas/all/weakref1w.d: New tests.
* gas/all/weakref2.s, gas/all/weakref3.s: New tests.
* gas/all/gas.exp: Run new tests.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/all/gas.exp | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/all/weakref1.d | 112 | ||||
-rw-r--r-- | gas/testsuite/gas/all/weakref1.s | 277 | ||||
-rw-r--r-- | gas/testsuite/gas/all/weakref1g.d | 18 | ||||
-rw-r--r-- | gas/testsuite/gas/all/weakref1l.d | 35 | ||||
-rw-r--r-- | gas/testsuite/gas/all/weakref1u.d | 53 | ||||
-rw-r--r-- | gas/testsuite/gas/all/weakref1w.d | 64 | ||||
-rw-r--r-- | gas/testsuite/gas/all/weakref2.s | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/all/weakref3.s | 5 |
10 files changed, 585 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index dd4a891..7d0cfa8 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2005-10-24 Alexandre Oliva <aoliva@redhat.com> + + * gas/all/weakref1.s, gas/all/weakref1.d: New test. + * gas/all/weakref1g.d, gas/all/weakref1l.d: New tests. + * gas/all/weakref1u.d, gas/all/weakref1w.d: New tests. + * gas/all/weakref2.s, gas/all/weakref3.s: New tests. + * gas/all/gas.exp: Run new tests. + 2005-10-24 Jan Beulich <jbeulich@novell.com> * gas/ia64/index.[sl]: New. diff --git a/gas/testsuite/gas/all/gas.exp b/gas/testsuite/gas/all/gas.exp index a5a8f4b..155a67e 100644 --- a/gas/testsuite/gas/all/gas.exp +++ b/gas/testsuite/gas/all/gas.exp @@ -250,6 +250,14 @@ if { ![istarget "i960-*-*"] } { run_dump_test quad } +run_dump_test weakref1 +run_dump_test weakref1g +run_dump_test weakref1l +run_dump_test weakref1u +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" + load_lib gas-dg.exp dg-init dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/err-*.s $srcdir/$subdir/warn-*.s]] "" "" diff --git a/gas/testsuite/gas/all/weakref1.d b/gas/testsuite/gas/all/weakref1.d new file mode 100644 index 0000000..7520b86 --- /dev/null +++ b/gas/testsuite/gas/all/weakref1.d @@ -0,0 +1,112 @@ +#objdump: -r +#name: weakref tests, relocations +# ecoff (OSF/alpha) lacks .weak support +# pdp11 lacks .long +# the following must be present in all weakref1*.d +#not-target: alpha*-*-osf* *-*-ecoff pdp11-*-aout + +#... +RELOCATION RECORDS FOR \[\.text\]: +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]+ [^ ]* +,' +# # script output: +#... +[0-9a-f]+ [^ ]* +wa1 +[0-9a-f]+ [^ ]* +ua2 +[0-9a-f]+ [^ ]* +ua3 +[0-9a-f]+ [^ ]* +ua3 +[0-9a-f]+ [^ ]* +ua4 +[0-9a-f]+ [^ ]* +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[^ ]* +(gd6|\.text)(\+0x[0-9a-f]+)? +[0-9a-f]+ [^ ]* +(gd7|\.text)(\+0x[0-9a-f]+)? +[0-9a-f]+ [^ ]* +(ld8|\.text)(\+0x[0-9a-f]+)? +[0-9a-f]+ [^ ]* +(ld8|\.text)(\+0x[0-9a-f]+)? +[0-9a-f]+ [^ ]* +(ld9|\.text)(\+0x[0-9a-f]+)? +[0-9a-f]+ [^ ]* +(ld9|\.text)(\+0x[0-9a-f]+)? diff --git a/gas/testsuite/gas/all/weakref1.s b/gas/testsuite/gas/all/weakref1.s new file mode 100644 index 0000000..e95e4f4 --- /dev/null +++ b/gas/testsuite/gas/all/weakref1.s @@ -0,0 +1,277 @@ + .text +l: +/* a# test references after weakref. */ + .weakref Wwa1, wa1 + .long Wwa1 + + .weakref Wua2, ua2 + .long ua2 + + .weakref Wua3, ua3 + .long Wua3 + .long ua3 + + .weakref Wua4, ua4 + .long ua4 + .long Wua4 + + .weakref Wna5, na5 + +/* b# test references before weakref. */ + .long Wwb1 + .weakref Wwb1, wb1 + + .long ub2 + .weakref Wub2, ub2 + + .long Wub3 + .long ub3 + .weakref Wub3, ub3 + + .long ub4 + .long Wub4 + .weakref Wub4, ub4 + +/* c# test combinations of references before and after weakref. */ + .long Wwc1 + .weakref Wwc1, wc1 + .long Wwc1 + + .long uc2 + .weakref Wuc2, uc2 + .long uc2 + + .long Wuc3 + .long uc3 + .weakref Wuc3, uc3 + .long Wuc3 + .long uc3 + + .long uc4 + .long Wuc4 + .weakref Wuc4, uc4 + .long uc4 + .long Wuc4 + + .long Wuc5 + .long uc5 + .weakref Wuc5, uc5 + .long uc5 + .long Wuc5 + + .long uc6 + .long Wuc6 + .weakref Wuc6, uc6 + .long uc6 + .long Wuc6 + + .long uc7 + .weakref Wuc7, uc7 + .long Wuc7 + + .long Wuc8 + .weakref Wuc8, uc8 + .long uc8 + + .long Wuc9 + .weakref Wuc9, uc9 + .long Wuc9 + .long uc9 + +/* w# test that explicitly weak target don't lose the weak status */ + .weakref Www1, ww1 + .weak ww1 + .long ww1 + + .weak ww2 + .weakref Www2, ww2 + .long ww2 + + .weak ww3 + .long ww3 + .weakref Www3, ww3 + .long ww3 + + .long ww4 + .weakref Www4, ww4 + .weak ww4 + .long ww4 + + .long ww5 + .weakref Www5, ww5 + .long ww5 + .weak ww5 + + .weakref Www6, ww6 + .weak ww6 + .long Www6 + + .weak ww7 + .weakref Www7, ww7 + .long Www7 + + .weak ww8 + .long Www8 + .weakref Www8, ww8 + .long Www8 + + .long Www9 + .weakref Www9, ww9 + .weak ww9 + .long Www9 + + .long Www10 + .weakref Www10, ww10 + .long Www10 + .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 + + .weakref Wum5a, um5 + .weakref Wum5b, um5 + .long um5 + + .weakref Wwm6a, wm6 + .weakref Wwm6b, wm6 + .long Wwm6a + + .weakref Wwm7a, wm7 + .weakref Wwm7b, wm7 + .long Wwm7b + + .weakref Wwm8a, wm8 + .long Wwm8b + .weakref Wwm8b, wm8 + +/* h# test weakref chain */ + .weakref Wnh1a, nh1 + .weakref Wnh1b, Wnh1a + .weakref Wnh1c, Wnh1b + + .weakref Wwh2a, wh2 + .weakref Wwh2b, Wwh2a + .long Wwh2b + + .weakref Wwh3a, wh3 + .weakref Wwh3b, Wwh3a + .long Wwh3a + + .weakref Wwh4b, Wwh4a + .weakref Wwh4a, wh4 + .long Wwh4b + + .long Wwh5b + .weakref Wwh5a, wh5 + .weakref Wwh5b, Wwh5a + + .long Wwh6b + .weakref Wwh6b, Wwh6a + .weakref Wwh6a, wh6 + + .weakref Wwh7b, Wwh7a + .long Wwh7b + .weakref Wwh7a, wh7 + + .long Wuh8c + .weakref Wuh8a, uh8 + .weakref Wuh8b, Wuh8a + .weakref Wuh8c, Wuh8b + .long uh8 + + .long Wuh9c + .weakref Wuh9c, Wuh9b + .weakref Wuh9b, Wuh9a + .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 + .set ld1, l + + .weakref Wld2, ld2 + .long Wld2 +ld2: + +ld3: + .weakref Wld3, ld3 + .long Wld3 + +ld4: + .long Wld4 + .weakref Wld4, ld4 + + .global ud5 + .weakref Wud5, ud5 + .long Wud5 + + .global gd6 + .weakref Wgd6, gd6 + .long Wgd6 +gd6: + + .weakref Wgd7, gd7 + .long Wgd7 + .global gd7 +gd7: + + .long Wld8c + .weakref Wld8a, ld8 + .weakref Wld8b, Wld8a + .weakref Wld8c, Wld8b + .long ld8 +ld8: + + .long Wld9c + .weakref Wld9c, Wld9b + .weakref Wld9b, Wld9a + .weakref Wld9a, ld9 + .long ld9 +ld9: diff --git a/gas/testsuite/gas/all/weakref1g.d b/gas/testsuite/gas/all/weakref1g.d new file mode 100644 index 0000000..999a3fc --- /dev/null +++ b/gas/testsuite/gas/all/weakref1g.d @@ -0,0 +1,18 @@ +#nm: --defined-only --extern-only --no-sort +#name: weakref tests, global syms +#source: weakref1.s +# see weakref1.d for comments on the not-targets +# ecoff (OSF/alpha) lacks .weak support +# pdp11 lacks .long +#not-target: alpha*-*-osf* *-*-ecoff pdp11-*-aout + +# the rest of this file is generated with the following script: +# # script begin +# echo \#... +# sed -n 's,^[ ]*\.global \(g.*\),.* T \1,p' weakref1.s | uniq +# echo \#pass +# # script output: +#... +.* T gd6 +.* T gd7 +#pass diff --git a/gas/testsuite/gas/all/weakref1l.d b/gas/testsuite/gas/all/weakref1l.d new file mode 100644 index 0000000..177d1f7 --- /dev/null +++ b/gas/testsuite/gas/all/weakref1l.d @@ -0,0 +1,35 @@ +#nm: --defined-only --no-sort +#name: weakref tests, local syms +#source: weakref1.s +# aix drops local symbols +# see weakref1.d for comments on the other not-targets +#not-target: *-*-aix* alpha*-*-osf* *-*-ecoff pdp11-*-aout + +# the rest of this file is generated with the following script: +# # script begin +# sed -n 's,^\(l[^ ]*\)[ ]*:.*,.* t \1,p;s:^[ ]*\.set[ ][ ]*\(l[^ ]*\)[ ]*,.*:.* t \1:p' weakref1.s | uniq | while read line; do echo "#..."; echo "$line"; done +# echo \#pass +# # script output: +#... +.* t l +#... +.* t lr1 +#... +.* t lr2 +#... +.* t lr6 +#... +.* t lr7 +#... +.* t ld1 +#... +.* t ld2 +#... +.* t ld3 +#... +.* t ld4 +#... +.* t ld8 +#... +.* t ld9 +#pass diff --git a/gas/testsuite/gas/all/weakref1u.d b/gas/testsuite/gas/all/weakref1u.d new file mode 100644 index 0000000..f88f73a --- /dev/null +++ b/gas/testsuite/gas/all/weakref1u.d @@ -0,0 +1,53 @@ +#nm: --undefined-only --no-sort +#name: weakref tests, strong undefined syms +#source: weakref1.s +# aout turns undefined into *ABS* symbols. +# see weakref1.d for comments on the other not-targets +#not-target: *-*-aout ns32k-*-netbsd alpha*-*-osf* *-*-ecoff pdp11-*-aout + +# the rest of this file is generated with the following script: +# # script begin +# sed -n 's:^[ ]*\.weakref .*, \(u.*\)$:.* U \1:p' weakref1.s | uniq | while read line; do echo "#..."; echo "$line"; done +# echo \#pass +# # script output: +#... +.* U ua2 +#... +.* U ua3 +#... +.* U ua4 +#... +.* U ub2 +#... +.* U ub3 +#... +.* U ub4 +#... +.* U uc2 +#... +.* U uc3 +#... +.* U uc4 +#... +.* U uc5 +#... +.* U uc6 +#... +.* U uc7 +#... +.* U uc8 +#... +.* 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 new file mode 100644 index 0000000..196e6a2 --- /dev/null +++ b/gas/testsuite/gas/all/weakref1w.d @@ -0,0 +1,64 @@ +#nm: --undefined-only --no-sort +#name: weakref tests, weak undefined syms +#source: weakref1.s +# see weakref1.d for comments on the not-targets +#not-target: alpha*-*-osf* *-*-ecoff pdp11-*-aout + +# the rest of this file is generated with the following script: +# # script begin +# sed -n 's:^[ ]*\.weakref .*, \(w.*\)$:.* w \1:p' weakref1.s | uniq | while read line; do echo "#..."; echo "$line"; done +# echo \#pass +# # script output: +#... +.* w wa1 +#... +.* w wb1 +#... +.* w wc1 +#... +.* w ww1 +#... +.* w ww2 +#... +.* w ww3 +#... +.* w ww4 +#... +.* w ww5 +#... +.* w ww6 +#... +.* w ww7 +#... +.* w ww8 +#... +.* w ww9 +#... +.* w ww10 +#... +.* w wm3 +#... +.* w wm6 +#... +.* w wm7 +#... +.* w wm8 +#... +.* w wh2 +#... +.* w wh3 +#... +.* w wh4 +#... +.* w wh5 +#... +.* w wh6 +#... +.* w wh7 +#... +.* w wr3 +#... +.* w wr4 +#... +.* w wr5 +#pass diff --git a/gas/testsuite/gas/all/weakref2.s b/gas/testsuite/gas/all/weakref2.s new file mode 100644 index 0000000..0f9cdc7 --- /dev/null +++ b/gas/testsuite/gas/all/weakref2.s @@ -0,0 +1,5 @@ +.weakref a,b +.weakref b,c +.weakref c,d +.weakref d,e +.weakref e,a diff --git a/gas/testsuite/gas/all/weakref3.s b/gas/testsuite/gas/all/weakref3.s new file mode 100644 index 0000000..9e5219a --- /dev/null +++ b/gas/testsuite/gas/all/weakref3.s @@ -0,0 +1,5 @@ +.weakref e,a +.weakref d,e +.weakref c,d +.weakref b,c +.weakref a,b |