This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] ld-elfvers don't fail on non-empty results
- From: Alan Modra <amodra at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 3 Dec 2016 10:55:37 -0000
- Subject: [binutils-gdb] ld-elfvers don't fail on non-empty results
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ca16c5b392b1c78019fea1710c4f4433161626c5
commit ca16c5b392b1c78019fea1710c4f4433161626c5
Author: Alan Modra <amodra@gmail.com>
Date: Sat Dec 3 20:59:19 2016 +1030
ld-elfvers don't fail on non-empty results
* testsuite/ld-elfvers/vers.exp (objdump_dynsymstuff): Don't abort
on non-empty results with empty expected.
Diff:
---
ld/ChangeLog | 5 +++++
ld/testsuite/ld-elfvers/vers.exp | 8 ++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ld/ChangeLog b/ld/ChangeLog
index c02f5e8..86a4fce 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,10 @@
2016-12-03 Alan Modra <amodra@gmail.com>
+ * testsuite/ld-elfvers/vers.exp (objdump_dynsymstuff): Don't abort
+ on non-empty results with empty expected.
+
+2016-12-03 Alan Modra <amodra@gmail.com>
+
* testsuite/ld-cdtest/cdtest-foo.cc: Test for __GNUG__ >= 2.
2016-12-03 Alan Modra <amodra@gmail.com>
diff --git a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/vers.exp
index 2f86938..a2a678b 100644
--- a/ld/testsuite/ld-elfvers/vers.exp
+++ b/ld/testsuite/ld-elfvers/vers.exp
@@ -390,8 +390,12 @@ proc objdump_dynsymstuff { objdump object expectfile } {
close $file_b
# Support empty files.
- if { ![info exists list_a] && ![info exists list_b] } then {
- return 1
+ if { ![info exists list_a] } then {
+ if { ![info exists list_b] } then {
+ return 1
+ }
+ verbose -log "\t$tmpdir/objdump.out: $list_b"
+ return 0
}
for { set i 0 } { $i < [llength $list_b] } { incr i } {