public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: fix readelf -S bintest test for N64 triples
@ 2023-08-17  3:40 YunQiang Su
  2023-08-28  3:53 ` YunQiang Su
  2023-10-03 11:56 ` Maciej W. Rozycki
  0 siblings, 2 replies; 5+ messages in thread
From: YunQiang Su @ 2023-08-17  3:40 UTC (permalink / raw)
  To: macro; +Cc: binutils, nickc, YunQiang Su

MIPS N64 has different section layout. Let's add a new file
readelf.s-64-tmips.

It can fix this test fail on mips64*-linux-gnuabi64 and mips64*-openbsd.
---
 .../testsuite/binutils-all/readelf.s-64-tmips | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 binutils/testsuite/binutils-all/readelf.s-64-tmips

diff --git a/binutils/testsuite/binutils-all/readelf.s-64-tmips b/binutils/testsuite/binutils-all/readelf.s-64-tmips
new file mode 100644
index 00000000000..5c19027d0b7
--- /dev/null
+++ b/binutils/testsuite/binutils-all/readelf.s-64-tmips
@@ -0,0 +1,25 @@
+There are .* section headers, starting at offset .*:
+
+Section Headers:
+ +\[Nr\] Name +Type +Address +Offset
+ +Size +EntSize +Flags +Link +Info +Align
+ +\[ 0\] +NULL +0000000000000000 +00000000
+ +0000000000000000 +0000000000000000 +0 +0 +0
+ +\[ 1\] .text +PROGBITS +0000000000000000 +00000040
+ +00000000000000.. +0000000000000000 +AX +0 +0 +.*
+ +\[ 2\] .rel.+text +REL. +0+ +0+.*
+ +000000000000001. +000000000000001. +I +. +1 +8
+ +\[ 3\] .data +PROGBITS +0000000000000000 +000000(48|50)
+ +0000000000000010 +0000000000000000 +WA +0 +0 +.*
+ +\[ 4\] .bss +NOBITS +0000000000000000 +00000060
+ +0000000000000000 +0000000000000000 +WA +0 +0 +.*
+# .MIPS.options, .MIPS.abiflags, .pdr, .gnu.attributes here
+#...
+ +\[ .\] .symtab +SYMTAB +0000000000000000 +0+.*
+ +0+.* +0000000000000018 +10 +10 +8
+ +\[10\] .strtab +STRTAB +0000000000000000 +0+.*
+ +0+.* +0000000000000000 .* +0 +0 +1
+ +\[11\] .shstrtab +STRTAB +0000000000000000 +[0-9a-f]+
+ +00000000000000.. +0000000000000000 .* +0 +0 +.*
+Key to Flags:
+#...
-- 
2.30.2


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

* Re: [PATCH] MIPS: fix readelf -S bintest test for N64 triples
  2023-08-17  3:40 [PATCH] MIPS: fix readelf -S bintest test for N64 triples YunQiang Su
@ 2023-08-28  3:53 ` YunQiang Su
  2023-09-28  3:45   ` YunQiang Su
  2023-10-03 11:56 ` Maciej W. Rozycki
  1 sibling, 1 reply; 5+ messages in thread
From: YunQiang Su @ 2023-08-28  3:53 UTC (permalink / raw)
  To: YunQiang Su; +Cc: macro, binutils, nickc

YunQiang Su <yunqiang.su@cipunited.com> 于2023年8月17日周四 11:41写道:
>
> MIPS N64 has different section layout. Let's add a new file
> readelf.s-64-tmips.
>
> It can fix this test fail on mips64*-linux-gnuabi64 and mips64*-openbsd.

@Maciej W. Rozycki I know you are quite busy. While can you have a
glance of these
short patch?

They are quite simple.

> ---
>  .../testsuite/binutils-all/readelf.s-64-tmips | 25 +++++++++++++++++++
>  1 file changed, 25 insertions(+)
>  create mode 100644 binutils/testsuite/binutils-all/readelf.s-64-tmips
>
> diff --git a/binutils/testsuite/binutils-all/readelf.s-64-tmips b/binutils/testsuite/binutils-all/readelf.s-64-tmips
> new file mode 100644
> index 00000000000..5c19027d0b7
> --- /dev/null
> +++ b/binutils/testsuite/binutils-all/readelf.s-64-tmips
> @@ -0,0 +1,25 @@
> +There are .* section headers, starting at offset .*:
> +
> +Section Headers:
> + +\[Nr\] Name +Type +Address +Offset
> + +Size +EntSize +Flags +Link +Info +Align
> + +\[ 0\] +NULL +0000000000000000 +00000000
> + +0000000000000000 +0000000000000000 +0 +0 +0
> + +\[ 1\] .text +PROGBITS +0000000000000000 +00000040
> + +00000000000000.. +0000000000000000 +AX +0 +0 +.*
> + +\[ 2\] .rel.+text +REL. +0+ +0+.*
> + +000000000000001. +000000000000001. +I +. +1 +8
> + +\[ 3\] .data +PROGBITS +0000000000000000 +000000(48|50)
> + +0000000000000010 +0000000000000000 +WA +0 +0 +.*
> + +\[ 4\] .bss +NOBITS +0000000000000000 +00000060
> + +0000000000000000 +0000000000000000 +WA +0 +0 +.*
> +# .MIPS.options, .MIPS.abiflags, .pdr, .gnu.attributes here
> +#...
> + +\[ .\] .symtab +SYMTAB +0000000000000000 +0+.*
> + +0+.* +0000000000000018 +10 +10 +8
> + +\[10\] .strtab +STRTAB +0000000000000000 +0+.*
> + +0+.* +0000000000000000 .* +0 +0 +1
> + +\[11\] .shstrtab +STRTAB +0000000000000000 +[0-9a-f]+
> + +00000000000000.. +0000000000000000 .* +0 +0 +.*
> +Key to Flags:
> +#...
> --
> 2.30.2
>


-- 
YunQiang Su

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

* Re: [PATCH] MIPS: fix readelf -S bintest test for N64 triples
  2023-08-28  3:53 ` YunQiang Su
@ 2023-09-28  3:45   ` YunQiang Su
  0 siblings, 0 replies; 5+ messages in thread
From: YunQiang Su @ 2023-09-28  3:45 UTC (permalink / raw)
  To: YunQiang Su; +Cc: macro, binutils, nickc

YunQiang Su <wzssyqa@gmail.com> 于2023年8月28日周一 11:53写道:
>
> YunQiang Su <yunqiang.su@cipunited.com> 于2023年8月17日周四 11:41写道:
> >
> > MIPS N64 has different section layout. Let's add a new file
> > readelf.s-64-tmips.
> >
> > It can fix this test fail on mips64*-linux-gnuabi64 and mips64*-openbsd.
>
> @Maciej W. Rozycki I know you are quite busy. While can you have a
> glance of these
> short patch?
>
> They are quite simple.
>
ping
-- 
YunQiang Su

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

* Re: [PATCH] MIPS: fix readelf -S bintest test for N64 triples
  2023-08-17  3:40 [PATCH] MIPS: fix readelf -S bintest test for N64 triples YunQiang Su
  2023-08-28  3:53 ` YunQiang Su
@ 2023-10-03 11:56 ` Maciej W. Rozycki
  2023-10-03 23:02   ` YunQiang Su
  1 sibling, 1 reply; 5+ messages in thread
From: Maciej W. Rozycki @ 2023-10-03 11:56 UTC (permalink / raw)
  To: YunQiang Su; +Cc: binutils, Nick Clifton

On Thu, 17 Aug 2023, YunQiang Su wrote:

> MIPS N64 has different section layout. Let's add a new file
> readelf.s-64-tmips.
> 
> It can fix this test fail on mips64*-linux-gnuabi64 and mips64*-openbsd.

 I actually had to chase readelf.exp and dive into it so as to find out 
whether and why this approach is correct.  This could have been mentioned 
in the description.

 Also due to how the test is called it wasn't clear to me from the 
description itself what test is actually affected.

> diff --git a/binutils/testsuite/binutils-all/readelf.s-64-tmips b/binutils/testsuite/binutils-all/readelf.s-64-tmips
> new file mode 100644
> index 00000000000..5c19027d0b7
> --- /dev/null
> +++ b/binutils/testsuite/binutils-all/readelf.s-64-tmips
> @@ -0,0 +1,25 @@
> +There are .* section headers, starting at offset .*:
> +
> +Section Headers:
> + +\[Nr\] Name +Type +Address +Offset
> + +Size +EntSize +Flags +Link +Info +Align
> + +\[ 0\] +NULL +0000000000000000 +00000000
> + +0000000000000000 +0000000000000000 +0 +0 +0
> + +\[ 1\] .text +PROGBITS +0000000000000000 +00000040
> + +00000000000000.. +0000000000000000 +AX +0 +0 +.*
> + +\[ 2\] .rel.+text +REL. +0+ +0+.*
> + +000000000000001. +000000000000001. +I +. +1 +8
> + +\[ 3\] .data +PROGBITS +0000000000000000 +000000(48|50)
> + +0000000000000010 +0000000000000000 +WA +0 +0 +.*
> + +\[ 4\] .bss +NOBITS +0000000000000000 +00000060
> + +0000000000000000 +0000000000000000 +WA +0 +0 +.*
> +# .MIPS.options, .MIPS.abiflags, .pdr, .gnu.attributes here
> +#...
> + +\[ .\] .symtab +SYMTAB +0000000000000000 +0+.*
> + +0+.* +0000000000000018 +10 +10 +8
> + +\[10\] .strtab +STRTAB +0000000000000000 +0+.*
> + +0+.* +0000000000000000 .* +0 +0 +1
> + +\[11\] .shstrtab +STRTAB +0000000000000000 +[0-9a-f]+
> + +00000000000000.. +0000000000000000 .* +0 +0 +.*
> +Key to Flags:
> +#...

 Since the scope for this dump is so narrow there is no need to 
wildcard-match output produced.  It can be an exact match for easier 
detection of unwanted changes in output, just as the original readelf.s 
dump used to be.

 Also #... at the end is unusual, #pass can be used to terminate matching 
successfully right away rather than wading through the rest of output only 
to ignore it.

 I have committed the change with these updates made for you, posted 
separately, thank you for your contribution.

  Maciej

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

* Re: [PATCH] MIPS: fix readelf -S bintest test for N64 triples
  2023-10-03 11:56 ` Maciej W. Rozycki
@ 2023-10-03 23:02   ` YunQiang Su
  0 siblings, 0 replies; 5+ messages in thread
From: YunQiang Su @ 2023-10-03 23:02 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: YunQiang Su, binutils, Nick Clifton

Maciej W. Rozycki <macro@orcam.me.uk> 于2023年10月3日周二 19:57写道:
>
> On Thu, 17 Aug 2023, YunQiang Su wrote:
>
> > MIPS N64 has different section layout. Let's add a new file
> > readelf.s-64-tmips.
> >
> > It can fix this test fail on mips64*-linux-gnuabi64 and mips64*-openbsd.
>
>  I actually had to chase readelf.exp and dive into it so as to find out
> whether and why this approach is correct.  This could have been mentioned
> in the description.
>
>  Also due to how the test is called it wasn't clear to me from the
> description itself what test is actually affected.
>
> > diff --git a/binutils/testsuite/binutils-all/readelf.s-64-tmips b/binutils/testsuite/binutils-all/readelf.s-64-tmips
> > new file mode 100644
> > index 00000000000..5c19027d0b7
> > --- /dev/null
> > +++ b/binutils/testsuite/binutils-all/readelf.s-64-tmips
> > @@ -0,0 +1,25 @@
> > +There are .* section headers, starting at offset .*:
> > +
> > +Section Headers:
> > + +\[Nr\] Name +Type +Address +Offset
> > + +Size +EntSize +Flags +Link +Info +Align
> > + +\[ 0\] +NULL +0000000000000000 +00000000
> > + +0000000000000000 +0000000000000000 +0 +0 +0
> > + +\[ 1\] .text +PROGBITS +0000000000000000 +00000040
> > + +00000000000000.. +0000000000000000 +AX +0 +0 +.*
> > + +\[ 2\] .rel.+text +REL. +0+ +0+.*
> > + +000000000000001. +000000000000001. +I +. +1 +8
> > + +\[ 3\] .data +PROGBITS +0000000000000000 +000000(48|50)
> > + +0000000000000010 +0000000000000000 +WA +0 +0 +.*
> > + +\[ 4\] .bss +NOBITS +0000000000000000 +00000060
> > + +0000000000000000 +0000000000000000 +WA +0 +0 +.*
> > +# .MIPS.options, .MIPS.abiflags, .pdr, .gnu.attributes here
> > +#...
> > + +\[ .\] .symtab +SYMTAB +0000000000000000 +0+.*
> > + +0+.* +0000000000000018 +10 +10 +8
> > + +\[10\] .strtab +STRTAB +0000000000000000 +0+.*
> > + +0+.* +0000000000000000 .* +0 +0 +1
> > + +\[11\] .shstrtab +STRTAB +0000000000000000 +[0-9a-f]+
> > + +00000000000000.. +0000000000000000 .* +0 +0 +.*
> > +Key to Flags:
> > +#...
>
>  Since the scope for this dump is so narrow there is no need to
> wildcard-match output produced.  It can be an exact match for easier
> detection of unwanted changes in output, just as the original readelf.s
> dump used to be.
>
>  Also #... at the end is unusual, #pass can be used to terminate matching
> successfully right away rather than wading through the rest of output only
> to ignore it.
>
>  I have committed the change with these updates made for you, posted
> separately, thank you for your contribution.
>

Thank you so much.

>   Maciej



-- 
YunQiang Su

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

end of thread, other threads:[~2023-10-03 23:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-17  3:40 [PATCH] MIPS: fix readelf -S bintest test for N64 triples YunQiang Su
2023-08-28  3:53 ` YunQiang Su
2023-09-28  3:45   ` YunQiang Su
2023-10-03 11:56 ` Maciej W. Rozycki
2023-10-03 23:02   ` 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).