From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7863) id AE5113858C60; Fri, 7 Jul 2023 07:32:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AE5113858C60 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: YunQiang Su To: bfd-cvs@sourceware.org Subject: [binutils-gdb/binutils-2_41-branch] ld: fix plugin tests for MIPS PIC X-Act-Checkin: binutils-gdb X-Git-Author: YunQiang Su X-Git-Refname: refs/heads/binutils-2_41-branch X-Git-Oldrev: 4a9d53839742bb74af5d8cbcd372e2a173fbc6ba X-Git-Newrev: 9c63989b5d7bf960e0fb7c7fe4c19a2fd312b774 Message-Id: <20230707073248.AE5113858C60@sourceware.org> Date: Fri, 7 Jul 2023 07:32:48 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2023 07:32:48 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D9c63989b5d7b= f960e0fb7c7fe4c19a2fd312b774 commit 9c63989b5d7bf960e0fb7c7fe4c19a2fd312b774 Author: YunQiang Su Date: Mon Jul 3 12:43:21 2023 +0800 ld: fix plugin tests for MIPS PIC =20 On MIPS, for PIC objects, symbols may reference 2 times: once from the caller, and once from GOT. Thus ld may complains 2 times about "undefined reference". =20 So we add a new "#?" line to every effected testsuite. Diff: --- ld/testsuite/ld-plugin/plugin-14.d | 1 + ld/testsuite/ld-plugin/plugin-15.d | 1 + ld/testsuite/ld-plugin/plugin-16.d | 1 + ld/testsuite/ld-plugin/plugin-20.d | 1 + ld/testsuite/ld-plugin/plugin-21.d | 1 + ld/testsuite/ld-plugin/plugin-22.d | 1 + ld/testsuite/ld-plugin/plugin-23.d | 1 + ld/testsuite/ld-plugin/plugin-6.d | 1 + ld/testsuite/ld-plugin/plugin-7.d | 1 + ld/testsuite/ld-plugin/plugin-8.d | 1 + 10 files changed, 10 insertions(+) diff --git a/ld/testsuite/ld-plugin/plugin-14.d b/ld/testsuite/ld-plugin/pl= ugin-14.d index bd8ef65a204..1209713d5ee 100644 --- a/ld/testsuite/ld-plugin/plugin-14.d +++ b/ld/testsuite/ld-plugin/plugin-14.d @@ -30,5 +30,6 @@ 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' +#?.*main.c.*: undefined reference to `\.?func' hook called: cleanup. #... diff --git a/ld/testsuite/ld-plugin/plugin-15.d b/ld/testsuite/ld-plugin/pl= ugin-15.d index 1647500e98f..a5304abeb0b 100644 --- a/ld/testsuite/ld-plugin/plugin-15.d +++ b/ld/testsuite/ld-plugin/plugin-15.d @@ -31,5 +31,6 @@ 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' +#?.*main.c.*: undefined reference to `\.?func' hook called: cleanup. #... diff --git a/ld/testsuite/ld-plugin/plugin-16.d b/ld/testsuite/ld-plugin/pl= ugin-16.d index f1ee03a4768..a166fcbdbb4 100644 --- a/ld/testsuite/ld-plugin/plugin-16.d +++ b/ld/testsuite/ld-plugin/plugin-16.d @@ -35,5 +35,6 @@ 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' +#?.*main.c.*: undefined reference to `\.?func' hook called: cleanup. #... diff --git a/ld/testsuite/ld-plugin/plugin-20.d b/ld/testsuite/ld-plugin/pl= ugin-20.d index e3c724df636..109971add2d 100644 --- a/ld/testsuite/ld-plugin/plugin-20.d +++ b/ld/testsuite/ld-plugin/plugin-20.d @@ -4,4 +4,5 @@ Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* .*: tmpdir/main.o: in function `main': .*main.c.*: undefined reference to `\.?func' +#?.*main.c.*: undefined reference to `\.?func' hook called: cleanup. diff --git a/ld/testsuite/ld-plugin/plugin-21.d b/ld/testsuite/ld-plugin/pl= ugin-21.d index 0b85f7151e4..e9586d541af 100644 --- a/ld/testsuite/ld-plugin/plugin-21.d +++ b/ld/testsuite/ld-plugin/plugin-21.d @@ -4,4 +4,5 @@ Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* .*: tmpdir/main.o: in function `main': .*main.c.*: undefined reference to `\.?func' +#?.*main.c.*: undefined reference to `\.?func' hook called: cleanup. diff --git a/ld/testsuite/ld-plugin/plugin-22.d b/ld/testsuite/ld-plugin/pl= ugin-22.d index 381ac03c052..f87f2a5cb23 100644 --- a/ld/testsuite/ld-plugin/plugin-22.d +++ b/ld/testsuite/ld-plugin/plugin-22.d @@ -4,4 +4,5 @@ Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* .*: tmpdir/main.o: in function `main': .*main.c.*: undefined reference to `\.?func' +#?.*main.c.*: undefined reference to `\.?func' hook called: cleanup. diff --git a/ld/testsuite/ld-plugin/plugin-23.d b/ld/testsuite/ld-plugin/pl= ugin-23.d index 0b6c25c1d1e..d4fdb74bc67 100644 --- a/ld/testsuite/ld-plugin/plugin-23.d +++ b/ld/testsuite/ld-plugin/plugin-23.d @@ -4,4 +4,5 @@ Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* .*: tmpdir/main.o: in function `main': .*main.c.*: undefined reference to `\.?func' +#?.*main.c.*: undefined reference to `\.?func' hook called: cleanup. diff --git a/ld/testsuite/ld-plugin/plugin-6.d b/ld/testsuite/ld-plugin/plu= gin-6.d index 41f44fbc37e..a969a27793a 100644 --- a/ld/testsuite/ld-plugin/plugin-6.d +++ b/ld/testsuite/ld-plugin/plugin-6.d @@ -30,5 +30,6 @@ 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' +#?.*main.c.*: undefined reference to `\.?func' hook called: cleanup. #... diff --git a/ld/testsuite/ld-plugin/plugin-7.d b/ld/testsuite/ld-plugin/plu= gin-7.d index b202edc863e..2222302dc5b 100644 --- a/ld/testsuite/ld-plugin/plugin-7.d +++ b/ld/testsuite/ld-plugin/plugin-7.d @@ -31,5 +31,6 @@ 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' +#?.*main.c.*: undefined reference to `\.?func' hook called: cleanup. #... diff --git a/ld/testsuite/ld-plugin/plugin-8.d b/ld/testsuite/ld-plugin/plu= gin-8.d index 0a38ddb1e4e..f29df64c368 100644 --- a/ld/testsuite/ld-plugin/plugin-8.d +++ b/ld/testsuite/ld-plugin/plugin-8.d @@ -35,5 +35,6 @@ 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' +#?.*main.c.*: undefined reference to `\.?func' hook called: cleanup. #...