This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ld, testsuite] Relax the expectation pattern for several plugin-* tests


hook called: all symbols read.
Input: /work/fsf-trunk-3/src/binutils-gdb/ld/testsuite/ld-plugin/func.c
(/work/fsf-trunk-3/src/binutils-gdb/ld/testsuite/ld-plugin/func.c)
Sym: 'func' Resolution: LDPR_PREVAILING_DEF
Sym: '_func' Resolution: LDPR_PREVAILING_DEF_IRONLY
/work/fsf-trunk-3/build-arm-none-eabi/obj/binutils/ld/ld-new:
/work/fsf-trunk-3/src/binutils-gdb/ld/testsuite/ld-plugin/func.c (symbol
from plugin)(func): warning: interworking not enabled.
  first occurrence:
/work/fsf-trunk-3/build-arm-none-eabi/obj/binutils/ld/tmpdir/main.o: Thumb
call to ARM

I think those failures are caused by those extra messages.
I am not familiar with ARM linker.  I can skip those tests
for ARM.

It looks like an ARM linker bug.  ARM linker shouldn't complain
anything on input BFDs with BFD_PLUGIN since it is a dummy
input file.

Or can we simply relax the testcase expectation result a little bit while
we still keeps those essential outputs that we want to catch?

Is this patch OK for master?

IMHO, keeping the warning might be better than silently accepting it.  As the
dummy input file really doesn't have proper elf header flags.  I am not sure
if relax the checking on BFD_PLUGIN will cause hiding silent issue once there
is future change on BFD_PLUGIN.

ld/
2017-02-10  Jiong Wang  <jiong.wang@arm.com>

        * testsuite/ld-plugin/plugin-15.d: Relax the match pattern.
        * testsuite/ld-plugin/plugin-16.d: Likewise.
        * testsuite/ld-plugin/plugin-20.d: Likewise.
        * testsuite/ld-plugin/plugin-21.d: Likewise.
        * testsuite/ld-plugin/plugin-22.d: Likewise.
        * testsuite/ld-plugin/plugin-23.d: Likewise.

diff --git a/ld/testsuite/ld-plugin/plugin-15.d b/ld/testsuite/ld-plugin/plugin-15.d
index 0481c5fb054b257410716c5a49b4a045e280e4ce..78f168626fb76eb33595de80205a25aa301b83c8 100644
--- a/ld/testsuite/ld-plugin/plugin-15.d
+++ b/ld/testsuite/ld-plugin/plugin-15.d
@@ -28,6 +28,7 @@ hook called: claim_file .*/ld/testsuite/ld-plugin/func.c \[@0/.* CLAIMED
 hook called: claim_file tmpdir/text.o \[@0/.* not claimed
 #...
 hook called: all symbols read.
+#...
 tmpdir/main.o: In function `main':
 .*main.c.*: undefined reference to `\.?func'
 hook called: cleanup.
diff --git a/ld/testsuite/ld-plugin/plugin-16.d b/ld/testsuite/ld-plugin/plugin-16.d
index ae54f0c24a1b90686e17ffc31e5dc4ab331e1e2c..a1f32a507920b72be55776614ca9f5b23d34a567 100644
--- a/ld/testsuite/ld-plugin/plugin-16.d
+++ b/ld/testsuite/ld-plugin/plugin-16.d
@@ -32,6 +32,7 @@ hook called: claim_file tmpdir/text.o \[@0/.* not claimed
 hook called: all symbols read.
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
 Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
+#...
 tmpdir/main.o: In function `main':
 .*main.c.*: undefined reference to `\.?func'
 hook called: cleanup.
diff --git a/ld/testsuite/ld-plugin/plugin-20.d b/ld/testsuite/ld-plugin/plugin-20.d
index 373a3ff2a3b037c1959710654c17a3c4008cd8a6..28ffc46a6876c0a40b835800663fc3382ac447f9 100644
--- a/ld/testsuite/ld-plugin/plugin-20.d
+++ b/ld/testsuite/ld-plugin/plugin-20.d
@@ -2,6 +2,7 @@ hook called: all symbols read.
 Input: func.c \(tmpdir/libfunc.a\)
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
+#...
 tmpdir/main.o: In function `main':
 .*main.c.*: undefined reference to `\.?func'
 hook called: cleanup.
diff --git a/ld/testsuite/ld-plugin/plugin-21.d b/ld/testsuite/ld-plugin/plugin-21.d
index 7b922c11e116f9f081f70782b7bdbcafb8a666bc..a5a5b59f891bf3c83d820bfba09b8765e79db402 100644
--- a/ld/testsuite/ld-plugin/plugin-21.d
+++ b/ld/testsuite/ld-plugin/plugin-21.d
@@ -2,6 +2,7 @@ hook called: all symbols read.
 Input: .*/ld/testsuite/ld-plugin/func.c \(.*/ld/testsuite/ld-plugin/func.c\)
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
+#...
 tmpdir/main.o: In function `main':
 .*main.c.*: undefined reference to `\.?func'
 hook called: cleanup.
diff --git a/ld/testsuite/ld-plugin/plugin-22.d b/ld/testsuite/ld-plugin/plugin-22.d
index 151267624f906a95d030e85efb99169810d26642..438a1f098d67596325171a2ebd08829a24ad3780 100644
--- a/ld/testsuite/ld-plugin/plugin-22.d
+++ b/ld/testsuite/ld-plugin/plugin-22.d
@@ -2,6 +2,7 @@ Claimed: tmpdir/libfunc.a \[@.*
 hook called: all symbols read.
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
+#...
 tmpdir/main.o: In function `main':
 .*main.c.*: undefined reference to `\.?func'
 hook called: cleanup.
diff --git a/ld/testsuite/ld-plugin/plugin-23.d b/ld/testsuite/ld-plugin/plugin-23.d
index e05f7bdfcf75a94331beca610b6aac122996d9c2..c279130ffdb0be5d5392fd6d77a0189c96333951 100644
--- a/ld/testsuite/ld-plugin/plugin-23.d
+++ b/ld/testsuite/ld-plugin/plugin-23.d
@@ -2,6 +2,7 @@ Claimed: .*/ld/testsuite/ld-plugin/func.c \[@0.*
 hook called: all symbols read.
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
 Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
+#...
 tmpdir/main.o: In function `main':
 .*main.c.*: undefined reference to `\.?func'
 hook called: cleanup.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]