public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [committed v3] MIPS: Fix `readelf -S bintest' test for n64 targets
@ 2023-10-03 11:56 Maciej W. Rozycki
  0 siblings, 0 replies; only message in thread
From: Maciej W. Rozycki @ 2023-10-03 11:56 UTC (permalink / raw)
  To: binutils; +Cc: YunQiang Su

From: YunQiang Su <yunqiang.su@cipunited.com>

Add a 64-bit traditional MIPS dump variant for the `readelf -S bintest'
test from binutils-all/readelf.exp, using a filename suffix according to
the rules set there, removing:

FAIL: readelf -S bintest

regressions with `mips64-linux-gnuabi64', `mips64el-linux-gnuabi64',
`mips64-openbsd', and `mips64el-openbsd' targets, which default to the
n64 ABI and consequently produce a section layout that is different from
what the generic dump pattern covers.

Co-Authored-By: Maciej W. Rozycki <macro@orcam.me.uk>

	binutils/
	* testsuite/binutils-all/readelf.s-64-tmips: New test variant.
---
Changes from v2:

- Rephrase change heading from "MIPS: fix readelf -S bintest test for
  N64 triples".

- Rewrite change description referring to binutils-all/readelf.exp and 
  dump variant logic there and listing the regression fixed in a clear 
  way, along with the targets affected.

- Make the dump an (almost) exact match since it's narrow-scoped.

- Replace #..., unusual at the end, with #pass.
---
 .../testsuite/binutils-all/readelf.s-64-tmips | 31 +++++++++++++++++++
 1 file changed, 31 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..918f7e3e838
--- /dev/null
+++ b/binutils/testsuite/binutils-all/readelf.s-64-tmips
@@ -0,0 +1,31 @@
+There are 12 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
+ +0000000000000010 +0000000000000000 +AX +0 +0 +16
+ +\[ 2\] \.rela\.text +RELA +0000000000000000 +00000290
+ +0000000000000018 +0000000000000018 +I +9 +1 +8
+ +\[ 3\] \.data +PROGBITS +0000000000000000 +00000050
+ +0000000000000010 +0000000000000000 +WA +0 +0 +16
+ +\[ 4\] \.bss +NOBITS +0000000000000000 +00000060
+ +0000000000000000 +0000000000000000 +WA +0 +0 +16
+ +\[ 5\] \.MIPS\.options +MIPS_OPTIONS +0000000000000000 +00000060
+ +0000000000000028 +0000000000000001 +Ao +0 +0 +8
+ +\[ 6\] \.MIPS\.abiflags +MIPS_ABIFLAGS +0000000000000000 +00000088
+ +0000000000000018 +0000000000000018 +A +0 +0 +8
+ +\[ 7\] \.pdr +PROGBITS +0000000000000000 +000000a0
+ +0000000000000000 +0000000000000000 +0 +0 +4
+ +\[ 8\] \.gnu\.attributes +GNU_ATTRIBUTES +0000000000000000 +000000a0
+ +0000000000000010 +0000000000000000 +0 +0 +1
+ +\[ 9\] \.symtab +SYMTAB +0000000000000000 +000000b0
+ +0000000000000180 +0000000000000018 +10 +10 +8
+ +\[10\] \.strtab +STRTAB +0000000000000000 +00000230
+ +000000000000005f +0000000000000000 +0 +0 +1
+ +\[11\] \.shstrtab +STRTAB +0000000000000000 +000002a8
+ +0000000000000063 +0000000000000000 +0 +0 +1
+Key to Flags:
+#pass
-- 
2.20.1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-03 11:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-03 11:56 [committed v3] MIPS: Fix `readelf -S bintest' test for n64 targets Maciej W. Rozycki

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