public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] ld: fix plugin tests for MIPS PIC
@ 2023-07-03  4:43 YunQiang Su
  2023-07-06  1:36 ` Alan Modra
  0 siblings, 1 reply; 4+ messages in thread
From: YunQiang Su @ 2023-07-03  4:43 UTC (permalink / raw)
  To: binutils; +Cc: macro, YunQiang Su

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".

So we add a new "#?" line to every effected testsuite.
---
 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/plugin-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/plugin-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/plugin-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/plugin-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/plugin-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/plugin-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/plugin-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/plugin-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/plugin-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/plugin-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.
 #...
-- 
2.30.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ld: fix plugin tests for MIPS PIC
  2023-07-03  4:43 [PATCH] ld: fix plugin tests for MIPS PIC YunQiang Su
@ 2023-07-06  1:36 ` Alan Modra
  2023-07-07  6:55   ` Matthias Klose
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Modra @ 2023-07-06  1:36 UTC (permalink / raw)
  To: YunQiang Su; +Cc: binutils, macro

On Mon, Jul 03, 2023 at 12:43:21PM +0800, YunQiang Su wrote:
> 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".
> 
> So we add a new "#?" line to every effected testsuite.

OK.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ld: fix plugin tests for MIPS PIC
  2023-07-06  1:36 ` Alan Modra
@ 2023-07-07  6:55   ` Matthias Klose
  2023-07-07  6:57     ` YunQiang Su
  0 siblings, 1 reply; 4+ messages in thread
From: Matthias Klose @ 2023-07-07  6:55 UTC (permalink / raw)
  To: YunQiang Su; +Cc: binutils, macro

On 06.07.23 03:36, Alan Modra via Binutils wrote:
> On Mon, Jul 03, 2023 at 12:43:21PM +0800, YunQiang Su wrote:
>> 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".
>>
>> So we add a new "#?" line to every effected testsuite.
> 
> OK.

please could you make sure to apply these to the 2.41 branch as well?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ld: fix plugin tests for MIPS PIC
  2023-07-07  6:55   ` Matthias Klose
@ 2023-07-07  6:57     ` YunQiang Su
  0 siblings, 0 replies; 4+ messages in thread
From: YunQiang Su @ 2023-07-07  6:57 UTC (permalink / raw)
  To: Matthias Klose; +Cc: YunQiang Su, binutils, macro

Matthias Klose <doko@debian.org> 于2023年7月7日周五 14:55写道:
>
> On 06.07.23 03:36, Alan Modra via Binutils wrote:
> > On Mon, Jul 03, 2023 at 12:43:21PM +0800, YunQiang Su wrote:
> >> 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".
> >>
> >> So we add a new "#?" line to every effected testsuite.
> >
> > OK.
>
> please could you make sure to apply these to the 2.41 branch as well?
>

Thanks to point it out. I will cherry-pick it.

-- 
YunQiang Su

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-07  6:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-03  4:43 [PATCH] ld: fix plugin tests for MIPS PIC YunQiang Su
2023-07-06  1:36 ` Alan Modra
2023-07-07  6:55   ` Matthias Klose
2023-07-07  6:57     ` YunQiang Su

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).