ld: fix plugin tests for MIPS PIC
Checks
Commit Message
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(+)
Comments
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.
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?
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.
@@ -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.
#...
@@ -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.
#...
@@ -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.
#...
@@ -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.
@@ -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.
@@ -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.
@@ -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.
@@ -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.
#...
@@ -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.
#...
@@ -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.
#...