From 65864bd2a680ce25c61802a416514fd526ad82a4 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 6 Jun 2006 04:30:21 +0000 Subject: * ld-elfvers/vers.exp (objdump_versionstuff): Allow versions in any order. * ld-elfvers/vers1.ver: Update. * ld-elfvers/vers2.ver: Update. * ld-elfvers/vers4a.ver: Update. * ld-elfvers/vers7a.ver: Update. * ld-elfvers/vers8.ver: Update. * ld-elfvers/vers9.ver: Update. * ld-elfvers/vers15.ver: Update. * ld-elfvers/vers16a.ver: Update. * ld-elfvers/vers17.ver: Update. * ld-elfvers/vers18.ver: Update. * ld-elfvers/vers20.ver: Update. * ld-elfvers/vers20a.ver: Update. * ld-elfvers/vers21.ver: Update. * ld-elfvers/vers22a.ver: Update. * ld-elfvers/vers22b.ver: Update. * ld-elfvers/vers23a.ver: Update. * ld-elfvers/vers23b.ver: Update. * ld-elfvers/vers23c.ver: Update. * ld-elfvers/vers25a.ver: Update. * ld-elfvers/vers26a.ver: Update. * ld-elfvers/vers27a.ver: Update. * ld-elfvers/vers27d.ver: Update. * ld-elfvers/vers28b.ver: Update. * ld-elfvers/vers29.ver: Update. * ld-elfvers/vers30.ver: Update. * ld-elfvers/vers31.ver: Update. --- ld/testsuite/ChangeLog | 31 +++++++++++++++++++++++++ ld/testsuite/ld-elfvers/vers.exp | 45 ++++++++++++++----------------------- ld/testsuite/ld-elfvers/vers1.ver | 8 +++---- ld/testsuite/ld-elfvers/vers15.ver | 6 ++--- ld/testsuite/ld-elfvers/vers16a.ver | 4 ++-- ld/testsuite/ld-elfvers/vers17.ver | 4 ++-- ld/testsuite/ld-elfvers/vers18.ver | 8 +++---- ld/testsuite/ld-elfvers/vers2.ver | 4 ++-- ld/testsuite/ld-elfvers/vers20.ver | 4 ++-- ld/testsuite/ld-elfvers/vers20a.ver | 4 ++-- ld/testsuite/ld-elfvers/vers21.ver | 4 ++-- ld/testsuite/ld-elfvers/vers22a.ver | 4 ++-- ld/testsuite/ld-elfvers/vers22b.ver | 4 ++-- ld/testsuite/ld-elfvers/vers23a.ver | 4 ++-- ld/testsuite/ld-elfvers/vers23b.ver | 4 ++-- ld/testsuite/ld-elfvers/vers23c.ver | 4 ++-- ld/testsuite/ld-elfvers/vers25a.ver | 4 ++-- ld/testsuite/ld-elfvers/vers26a.ver | 4 ++-- ld/testsuite/ld-elfvers/vers27a.ver | 4 ++-- ld/testsuite/ld-elfvers/vers27d.ver | 4 ++-- ld/testsuite/ld-elfvers/vers28b.ver | 4 ++-- ld/testsuite/ld-elfvers/vers29.ver | 4 ++-- ld/testsuite/ld-elfvers/vers30.ver | 4 ++-- ld/testsuite/ld-elfvers/vers31.ver | 4 ++-- ld/testsuite/ld-elfvers/vers4a.ver | 4 ++-- ld/testsuite/ld-elfvers/vers7a.ver | 4 ++-- ld/testsuite/ld-elfvers/vers8.ver | 8 +++---- ld/testsuite/ld-elfvers/vers9.ver | 6 ++--- 28 files changed, 108 insertions(+), 88 deletions(-) diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 0c08e680ea..5b36623e46 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,34 @@ +2006-06-06 Alan Modra + + * ld-elfvers/vers.exp (objdump_versionstuff): Allow versions in + any order. + * ld-elfvers/vers1.ver: Update. + * ld-elfvers/vers2.ver: Update. + * ld-elfvers/vers4a.ver: Update. + * ld-elfvers/vers7a.ver: Update. + * ld-elfvers/vers8.ver: Update. + * ld-elfvers/vers9.ver: Update. + * ld-elfvers/vers15.ver: Update. + * ld-elfvers/vers16a.ver: Update. + * ld-elfvers/vers17.ver: Update. + * ld-elfvers/vers18.ver: Update. + * ld-elfvers/vers20.ver: Update. + * ld-elfvers/vers20a.ver: Update. + * ld-elfvers/vers21.ver: Update. + * ld-elfvers/vers22a.ver: Update. + * ld-elfvers/vers22b.ver: Update. + * ld-elfvers/vers23a.ver: Update. + * ld-elfvers/vers23b.ver: Update. + * ld-elfvers/vers23c.ver: Update. + * ld-elfvers/vers25a.ver: Update. + * ld-elfvers/vers26a.ver: Update. + * ld-elfvers/vers27a.ver: Update. + * ld-elfvers/vers27d.ver: Update. + * ld-elfvers/vers28b.ver: Update. + * ld-elfvers/vers29.ver: Update. + * ld-elfvers/vers30.ver: Update. + * ld-elfvers/vers31.ver: Update. + 2006-06-05 Alan Modra * ld-elf/sec64k.exp: Add "main" symbol. Use dc.a for addresses. diff --git a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/vers.exp index 6bb77a7c26..d8ba1b8819 100644 --- a/ld/testsuite/ld-elfvers/vers.exp +++ b/ld/testsuite/ld-elfvers/vers.exp @@ -460,44 +460,33 @@ proc objdump_versionstuff { objdump object expectfile } { # It's OK if there are extra lines in the actual output; they # may come from version information in libc. We require that - # every line in EXPECTFILE appear in the output in order. + # every line in EXPECTFILE appear in the output in any order. - set f1 [open $tmpdir/objdump.out r] set f2 [open $expectfile r] while { [gets $f2 l2] != -1 } { if { ![regexp "^#.*$" $l2] } then { - break - } - } - while { [gets $f1 l1] != -1 } { - if { [string match $l2 $l1] } then { - if { [gets $f2 l2] == -1 } then { + set f1 [open $tmpdir/objdump.out r] + while { [gets $f1 l1] != -1 } { + if { [string match $l2 $l1] } then { + break + } + } + close $f1 + + if { ![string match $l2 $l1] } then { + verbose -log "Did not find \"$l2\"" + set f1 [open $tmpdir/objdump.out r] + while { [gets $f1 l1] != -1 } { + verbose -log $l1 + } close $f1 close $f2 - return 1 + return 0 } } } - - # We reached the end of the output without seeing the line we - # expected. This is a test failure. - - close $f1 close $f2 - - # Support empty expected file. - if [string match "" $l2] then { - return 1 - } - - verbose -log "Did not find \"$l2\"" - set f1 [open $tmpdir/objdump.out r] - while { [gets $f1 l1] != -1 } { - verbose -log $l1 - } - - verbose -log "$exec_output" - return 0 + return 1 } else { verbose -log "$exec_output" return 0 diff --git a/ld/testsuite/ld-elfvers/vers1.ver b/ld/testsuite/ld-elfvers/vers1.ver index ace685da17..a42b970d49 100644 --- a/ld/testsuite/ld-elfvers/vers1.ver +++ b/ld/testsuite/ld-elfvers/vers1.ver @@ -1,8 +1,8 @@ Version definitions: -1 0x01 0x0c96425f vers1.so -2 0x00 0x0a7927b1 VERS_1.1 -3 0x00 0x0a7927b2 VERS_1.2 +[1-4] 0x01 0x0c96425f vers1.so +[1-4] 0x00 0x0a7927b1 VERS_1.1 +[1-4] 0x00 0x0a7927b2 VERS_1.2 VERS_1.1 -4 0x00 0x0a7922b0 VERS_2.0 +[1-4] 0x00 0x0a7922b0 VERS_2.0 VERS_1.2 diff --git a/ld/testsuite/ld-elfvers/vers15.ver b/ld/testsuite/ld-elfvers/vers15.ver index f60021e068..3f960fd07e 100644 --- a/ld/testsuite/ld-elfvers/vers15.ver +++ b/ld/testsuite/ld-elfvers/vers15.ver @@ -1,5 +1,5 @@ Version definitions: -1 0x01 0x07cc9645 vers15 -2 0x00 0x0a7927b2 VERS_1.2 -3 0x00 0x0a7927b1 VERS_1.1 +[1-3] 0x01 0x07cc9645 vers15 +[1-3] 0x00 0x0a7927b1 VERS_1.1 +[1-3] 0x00 0x0a7927b2 VERS_1.2 diff --git a/ld/testsuite/ld-elfvers/vers16a.ver b/ld/testsuite/ld-elfvers/vers16a.ver index 5b6063b100..7b50067847 100644 --- a/ld/testsuite/ld-elfvers/vers16a.ver +++ b/ld/testsuite/ld-elfvers/vers16a.ver @@ -1,3 +1,3 @@ Version definitions: -1 0x01 0x064c090f vers16a.so -2 0x00 0x0a7927b1 VERS_1.1 +[1-2] 0x01 0x064c090f vers16a.so +[1-2] 0x00 0x0a7927b1 VERS_1.1 diff --git a/ld/testsuite/ld-elfvers/vers17.ver b/ld/testsuite/ld-elfvers/vers17.ver index 0dad2a6dcc..b234c9b486 100644 --- a/ld/testsuite/ld-elfvers/vers17.ver +++ b/ld/testsuite/ld-elfvers/vers17.ver @@ -1,3 +1,3 @@ Version definitions: -1 0x01 0x0964f95f vers17.so -2 0x00 0x0a7922b0 VERS_2.0 +[1-2] 0x01 0x0964f95f vers17.so +[1-2] 0x00 0x0a7922b0 VERS_2.0 diff --git a/ld/testsuite/ld-elfvers/vers18.ver b/ld/testsuite/ld-elfvers/vers18.ver index c6b14e8f9a..c6023de064 100644 --- a/ld/testsuite/ld-elfvers/vers18.ver +++ b/ld/testsuite/ld-elfvers/vers18.ver @@ -1,7 +1,7 @@ Version definitions: -1 0x01 0x0964e95f vers18.so -2 0x00 0x0a7927b1 VERS_1.1 -3 0x00 0x0a7927b2 VERS_1.2 +[1-4] 0x01 0x0964e95f vers18.so +[1-4] 0x00 0x0a7927b1 VERS_1.1 +[1-4] 0x00 0x0a7927b2 VERS_1.2 VERS_1.1 -4 0x00 0x0a7922b0 VERS_2.0 +[1-4] 0x00 0x0a7922b0 VERS_2.0 VERS_1.2 diff --git a/ld/testsuite/ld-elfvers/vers2.ver b/ld/testsuite/ld-elfvers/vers2.ver index 4ca81eb3a6..ea992fff1c 100644 --- a/ld/testsuite/ld-elfvers/vers2.ver +++ b/ld/testsuite/ld-elfvers/vers2.ver @@ -1,6 +1,6 @@ Version definitions: -1 0x01 0x0c96525f vers2.so -2 0x00 0x08785b51 VERS_XXX_1.1 +[1-2] 0x01 0x0c96525f vers2.so +[1-2] 0x00 0x08785b51 VERS_XXX_1.1 Version References: required from tmpdir/vers1.so: diff --git a/ld/testsuite/ld-elfvers/vers20.ver b/ld/testsuite/ld-elfvers/vers20.ver index afeb137472..133914770f 100644 --- a/ld/testsuite/ld-elfvers/vers20.ver +++ b/ld/testsuite/ld-elfvers/vers20.ver @@ -1,4 +1,4 @@ Version definitions: -1 0x01 0x0965695f vers20.so -2 0x00 0x0a7927b1 VERS_1.1 +[1-2] 0x01 0x0965695f vers20.so +[1-2] 0x00 0x0a7927b1 VERS_1.1 diff --git a/ld/testsuite/ld-elfvers/vers20a.ver b/ld/testsuite/ld-elfvers/vers20a.ver index 2592f02394..c7e11fbdd6 100644 --- a/ld/testsuite/ld-elfvers/vers20a.ver +++ b/ld/testsuite/ld-elfvers/vers20a.ver @@ -1,4 +1,4 @@ Version definitions: -1 0x01 0x0652090f vers20a.so -2 0x00 0x0a7927b1 VERS_1.1 +[1-2] 0x01 0x0652090f vers20a.so +[1-2] 0x00 0x0a7927b1 VERS_1.1 diff --git a/ld/testsuite/ld-elfvers/vers21.ver b/ld/testsuite/ld-elfvers/vers21.ver index 3ba24d8017..76e4a521cf 100644 --- a/ld/testsuite/ld-elfvers/vers21.ver +++ b/ld/testsuite/ld-elfvers/vers21.ver @@ -1,4 +1,4 @@ Version definitions: -1 0x01 0x0965595f vers21.so -2 0x00 0x05aa7610 VERS.0 +[1-2] 0x01 0x0965595f vers21.so +[1-2] 0x00 0x05aa7610 VERS.0 diff --git a/ld/testsuite/ld-elfvers/vers22a.ver b/ld/testsuite/ld-elfvers/vers22a.ver index bb4d3bf0c9..b7e1f62d4d 100644 --- a/ld/testsuite/ld-elfvers/vers22a.ver +++ b/ld/testsuite/ld-elfvers/vers22a.ver @@ -1,4 +1,4 @@ Version definitions: -1 0x01 0x0660090f vers22a.so -2 0x00 0x05aa7610 VERS.0 +[1-2] 0x01 0x0660090f vers22a.so +[1-2] 0x00 0x05aa7610 VERS.0 diff --git a/ld/testsuite/ld-elfvers/vers22b.ver b/ld/testsuite/ld-elfvers/vers22b.ver index b1c834b4f8..b20f6366c3 100644 --- a/ld/testsuite/ld-elfvers/vers22b.ver +++ b/ld/testsuite/ld-elfvers/vers22b.ver @@ -1,4 +1,4 @@ Version definitions: -1 0x01 0x065f990f vers22b.so -2 0x00 0x05aa7610 VERS.0 +[1-2] 0x01 0x065f990f vers22b.so +[1-2] 0x00 0x05aa7610 VERS.0 diff --git a/ld/testsuite/ld-elfvers/vers23a.ver b/ld/testsuite/ld-elfvers/vers23a.ver index 9132d2db2e..3f3e3c0adb 100644 --- a/ld/testsuite/ld-elfvers/vers23a.ver +++ b/ld/testsuite/ld-elfvers/vers23a.ver @@ -1,4 +1,4 @@ Version definitions: -1 0x01 0x065f090f vers23a.so -2 0x00 0x05aa7610 VERS.0 +[1-2] 0x01 0x065f090f vers23a.so +[1-2] 0x00 0x05aa7610 VERS.0 diff --git a/ld/testsuite/ld-elfvers/vers23b.ver b/ld/testsuite/ld-elfvers/vers23b.ver index 629d2bc1cf..4e3edb3c69 100644 --- a/ld/testsuite/ld-elfvers/vers23b.ver +++ b/ld/testsuite/ld-elfvers/vers23b.ver @@ -1,4 +1,4 @@ Version definitions: -1 0x01 0x065e990f vers23b.so -2 0x00 0x05aa7610 VERS.0 +[1-2] 0x01 0x065e990f vers23b.so +[1-2] 0x00 0x05aa7610 VERS.0 diff --git a/ld/testsuite/ld-elfvers/vers23c.ver b/ld/testsuite/ld-elfvers/vers23c.ver index 73d771659c..1fc69e8e4f 100644 --- a/ld/testsuite/ld-elfvers/vers23c.ver +++ b/ld/testsuite/ld-elfvers/vers23c.ver @@ -1,4 +1,4 @@ Version definitions: -1 0x01 0x065ea90f vers23c.so -2 0x00 0x05aa7610 VERS.0 +[1-2] 0x01 0x065ea90f vers23c.so +[1-2] 0x00 0x05aa7610 VERS.0 diff --git a/ld/testsuite/ld-elfvers/vers25a.ver b/ld/testsuite/ld-elfvers/vers25a.ver index 81a71603f8..df3aad0196 100644 --- a/ld/testsuite/ld-elfvers/vers25a.ver +++ b/ld/testsuite/ld-elfvers/vers25a.ver @@ -1,4 +1,4 @@ Version definitions: -1 0x01 0x065d090f vers25a.so -2 0x00 0x05aa7610 VERS.0 +[1-2] 0x01 0x065d090f vers25a.so +[1-2] 0x00 0x05aa7610 VERS.0 diff --git a/ld/testsuite/ld-elfvers/vers26a.ver b/ld/testsuite/ld-elfvers/vers26a.ver index 3e67ef1a33..5462658009 100644 --- a/ld/testsuite/ld-elfvers/vers26a.ver +++ b/ld/testsuite/ld-elfvers/vers26a.ver @@ -1,4 +1,4 @@ Version definitions: -1 0x01 0x065c090f vers26a.so -2 0x00 0x05aa7610 VERS.0 +[1-2] 0x01 0x065c090f vers26a.so +[1-2] 0x00 0x05aa7610 VERS.0 diff --git a/ld/testsuite/ld-elfvers/vers27a.ver b/ld/testsuite/ld-elfvers/vers27a.ver index 06d85e644e..634f1f0a13 100644 --- a/ld/testsuite/ld-elfvers/vers27a.ver +++ b/ld/testsuite/ld-elfvers/vers27a.ver @@ -1,4 +1,4 @@ Version definitions: -1 0x01 0x065b090f vers27a.so -2 0x00 0x05aa7610 VERS.0 +[1-2] 0x01 0x065b090f vers27a.so +[1-2] 0x00 0x05aa7610 VERS.0 diff --git a/ld/testsuite/ld-elfvers/vers27d.ver b/ld/testsuite/ld-elfvers/vers27d.ver index 672c7ad200..8343f3ae9f 100644 --- a/ld/testsuite/ld-elfvers/vers27d.ver +++ b/ld/testsuite/ld-elfvers/vers27d.ver @@ -1,4 +1,4 @@ Version definitions: -1 0x01 0x05ac0cff vers27d1.so -2 0x00 0x05aa7610 VERS.0 +[1-2] 0x01 0x05ac0cff vers27d1.so +[1-2] 0x00 0x05aa7610 VERS.0 diff --git a/ld/testsuite/ld-elfvers/vers28b.ver b/ld/testsuite/ld-elfvers/vers28b.ver index ab99615100..b826c539b4 100644 --- a/ld/testsuite/ld-elfvers/vers28b.ver +++ b/ld/testsuite/ld-elfvers/vers28b.ver @@ -1,4 +1,4 @@ Version definitions: -1 0x01 0x0659990f vers28b.so -2 0x00 0x05aa7610 VERS.0 +[1-2] 0x01 0x0659990f vers28b.so +[1-2] 0x00 0x05aa7610 VERS.0 diff --git a/ld/testsuite/ld-elfvers/vers29.ver b/ld/testsuite/ld-elfvers/vers29.ver index 85c05a8528..5e73fab0b4 100644 --- a/ld/testsuite/ld-elfvers/vers29.ver +++ b/ld/testsuite/ld-elfvers/vers29.ver @@ -1,3 +1,3 @@ Version definitions: -1 0x01 0x0965d95f vers29.so -2 0x00 0x0965d95f vers29.so +[1-2] 0x01 0x0965d95f vers29.so +[1-2] 0x00 0x0965d95f vers29.so diff --git a/ld/testsuite/ld-elfvers/vers30.ver b/ld/testsuite/ld-elfvers/vers30.ver index dfcf0dac70..e0968b9644 100644 --- a/ld/testsuite/ld-elfvers/vers30.ver +++ b/ld/testsuite/ld-elfvers/vers30.ver @@ -1,4 +1,4 @@ Version definitions: -1 0x01 0x0966695f vers30.so -2 0x00 0x079239b0 VERS_30.0 +[1-2] 0x01 0x0966695f vers30.so +[1-2] 0x00 0x079239b0 VERS_30.0 diff --git a/ld/testsuite/ld-elfvers/vers31.ver b/ld/testsuite/ld-elfvers/vers31.ver index b79a5ab9d4..c1a0ed495f 100644 --- a/ld/testsuite/ld-elfvers/vers31.ver +++ b/ld/testsuite/ld-elfvers/vers31.ver @@ -1,3 +1,3 @@ Version definitions: -1 0x01 0x0966595f vers31.so -2 0x00 0x07923ab0 VERS_31.0 +[1-2] 0x01 0x0966595f vers31.so +[1-2] 0x00 0x07923ab0 VERS_31.0 diff --git a/ld/testsuite/ld-elfvers/vers4a.ver b/ld/testsuite/ld-elfvers/vers4a.ver index 41ee241e2c..1f02b9dc2a 100644 --- a/ld/testsuite/ld-elfvers/vers4a.ver +++ b/ld/testsuite/ld-elfvers/vers4a.ver @@ -1,4 +1,4 @@ Version definitions: -1 0x01 0x07cc96a1 vers4a -2 0x00 0x0a7922b0 VERS_2.0 +[1-2] 0x01 0x07cc96a1 vers4a +[1-2] 0x00 0x0a7922b0 VERS_2.0 diff --git a/ld/testsuite/ld-elfvers/vers7a.ver b/ld/testsuite/ld-elfvers/vers7a.ver index 7b3bf0a973..eeac5c5f3a 100644 --- a/ld/testsuite/ld-elfvers/vers7a.ver +++ b/ld/testsuite/ld-elfvers/vers7a.ver @@ -1,4 +1,4 @@ Version definitions: -1 0x01 0x096d595f vers7a.so -2 0x00 0x05aa7921 VERS_1 +[1-2] 0x01 0x096d595f vers7a.so +[1-2] 0x00 0x05aa7921 VERS_1 diff --git a/ld/testsuite/ld-elfvers/vers8.ver b/ld/testsuite/ld-elfvers/vers8.ver index a4b5296ffd..47996c9bae 100644 --- a/ld/testsuite/ld-elfvers/vers8.ver +++ b/ld/testsuite/ld-elfvers/vers8.ver @@ -1,8 +1,8 @@ Version definitions: -1 0x01 0x0c96b25f vers8.so -2 0x00 0x0a7927b1 VERS_1.1 -3 0x00 0x0a7927b2 VERS_1.2 +[1-4] 0x01 0x0c96b25f vers8.so +[1-4] 0x00 0x0a7927b1 VERS_1.1 +[1-4] 0x00 0x0a7927b2 VERS_1.2 VERS_1.1 -4 0x00 0x0a7922b0 VERS_2.0 +[1-4] 0x00 0x0a7922b0 VERS_2.0 VERS_1.2 diff --git a/ld/testsuite/ld-elfvers/vers9.ver b/ld/testsuite/ld-elfvers/vers9.ver index cc7369124c..fce267c34d 100644 --- a/ld/testsuite/ld-elfvers/vers9.ver +++ b/ld/testsuite/ld-elfvers/vers9.ver @@ -1,5 +1,5 @@ Version definitions: -1 0x01 0x007cc969 vers9 -2 0x00 0x0a7927b1 VERS_1.1 -3 0x00 0x0a7927b2 VERS_1.2 +[1-3] 0x01 0x007cc969 vers9 +[1-3] 0x00 0x0a7927b1 VERS_1.1 +[1-3] 0x00 0x0a7927b2 VERS_1.2 -- cgit v1.2.1