public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [committed 00/16] MIPS: Revert the change of `mipsisa64*-*-linux*' semantics
@ 2023-07-28  5:06 Maciej W. Rozycki
  2023-07-28  5:06 ` [committed 01/16] Revert "MIPS: support mips*64 as CPU and gnuabi64 as ABI" Maciej W. Rozycki
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: Maciej W. Rozycki @ 2023-07-28  5:06 UTC (permalink / raw)
  To: Nick Clifton; +Cc: YunQiang Su, binutils

Hi,

 I have committed this patch series to remove the change of the semantics 
of the `mipsisa64*-*-linux*' target triplet.  Said change wasn't correctly 
reviewed/evaluated and was entagled with an unrelated change that added 
support for having the n64 ABI by default with `mips64*-*-linux-gnuabi64' 
triplets.

 Firstly the offending change is reverted, then the test suite is updated 
so that the re-addition of `mips64*-*-linux-gnuabi64' does not cause new 
failures (also fixing some related preexisting `mips64*-*-openbsd' and 
`mips-sgi-irix*' regressions), and finally the `mips64*-*-linux-gnuabi64' 
part (previously approved by Richard Sandiford) is reapplied.  Included 
there is a bug fix for `.interp' section handling too, which I think is 
important for the new `mips64*-*-linux-gnuabi64' targets.

 There are a bunch of a regressions regardless because test suite changes 
revealed a genuine bug in the MIPS backend and also I haven't addressed an 
issue with `readelf -S bintest' for `mips64*-*-linux-gnuabi64', because I 
have a feeling that adding more and more section headers variations to 
binutils/testsuite/binutils-all/readelf.s-64 weakens coverage for targets 
already handled previously.  We can discuss possible solutions and fix it 
separately, and naturally bugs need to be addressed on their own each but 
that's not 2.41 material.

 I have verified it with my usual set of MIPS and non-MIPS targets, the 
latter for the MIPS-specific changes to the generic parts of the test 
suite.  There were no regressions for non-MIPS targets and any issues with 
MIPS targets have been noted in the change descriptions of the respective 
commits.

 Pushed to master and backported to 2.41.

 Nick, thank you for your patience and apologies for causing you and 
other people this delay.

  Maciej

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

* [committed 01/16] Revert "MIPS: support mips*64 as CPU and gnuabi64 as ABI"
  2023-07-28  5:06 [committed 00/16] MIPS: Revert the change of `mipsisa64*-*-linux*' semantics Maciej W. Rozycki
@ 2023-07-28  5:06 ` Maciej W. Rozycki
  2023-07-28  5:06 ` [committed 02/16] MIPS/LD: Include n64 `.interp' with INITIAL_READONLY_SECTIONS Maciej W. Rozycki
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Maciej W. Rozycki @ 2023-07-28  5:06 UTC (permalink / raw)
  To: Nick Clifton; +Cc: YunQiang Su, binutils

This reverts commit 32f1c80375ebe8ad25d9805ee5889f0006c51e59.  It had 
two unrelated changes lumped together, one of which changed the meaning 
of the `mipsisa64*-*-linux*' target triplets, which was not properly 
evaluated.
---
 bfd/config.bfd                                         |   14 ++------------
 binutils/testsuite/binutils-all/mips/mips-note-2-n32.d |    1 -
 gas/configure                                          |    5 +----
 gas/configure.ac                                       |    5 +----
 gold/configure.tgt                                     |   14 --------------
 ld/configure.tgt                                       |   12 ++----------
 6 files changed, 6 insertions(+), 45 deletions(-)

binutils-32f1c80375eb-rev.diff
Index: binutils-gdb/bfd/config.bfd
===================================================================
--- binutils-gdb.orig/bfd/config.bfd
+++ binutils-gdb/bfd/config.bfd
@@ -941,21 +941,11 @@ case "${targ}" in
     targ_defvec=mips_elf32_be_vec
     targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
     ;;
-  mips*64*el-*-linux*-gnuabi64)
-    targ_defvec=mips_elf64_trad_le_vec
-    targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec"
-    want64=true
-    ;;
-  mips*64*-*-linux*-gnuabi64)
-    targ_defvec=mips_elf64_trad_be_vec
-    targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec"
-    want64=true
-    ;;
-  mips*64*el-*-linux*)
+  mips64*el-*-linux*)
     targ_defvec=mips_elf32_ntrad_le_vec
     targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec"
     ;;
-  mips*64*-*-linux*)
+  mips64*-*-linux*)
     targ_defvec=mips_elf32_ntrad_be_vec
     targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
     ;;
Index: binutils-gdb/binutils/testsuite/binutils-all/mips/mips-note-2-n32.d
===================================================================
--- binutils-gdb.orig/binutils/testsuite/binutils-all/mips/mips-note-2-n32.d
+++ binutils-gdb/binutils/testsuite/binutils-all/mips/mips-note-2-n32.d
@@ -1,5 +1,4 @@
 #PROG: objcopy
-#as: -n32
 #readelf: --notes --wide
 #objcopy: --merge-notes
 #name: MIPS merge notes section (n32)
Index: binutils-gdb/gas/configure
===================================================================
--- binutils-gdb.orig/gas/configure
+++ binutils-gdb/gas/configure
@@ -12225,10 +12225,7 @@ _ACEOF
 	esac
 	# Decide which ABI to target by default.
 	case ${target} in
-	  mips*64*-linux-gnuabi64)
-	    mips_default_abi=N64_ABI
-	    ;;
-	  mips*64*-linux* | mips-sgi-irix6* | mips64*-freebsd* \
+	  mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* \
 	  | mips64*-kfreebsd*-gnu | mips64*-ps2-elf*)
 	    mips_default_abi=N32_ABI
 	    ;;
Index: binutils-gdb/gas/configure.ac
===================================================================
--- binutils-gdb.orig/gas/configure.ac
+++ binutils-gdb/gas/configure.ac
@@ -394,10 +394,7 @@ changequote([,])dnl
 	esac
 	# Decide which ABI to target by default.
 	case ${target} in
-	  mips*64*-linux-gnuabi64)
-	    mips_default_abi=N64_ABI
-	    ;;
-	  mips*64*-linux* | mips-sgi-irix6* | mips64*-freebsd* \
+	  mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* \
 	  | mips64*-kfreebsd*-gnu | mips64*-ps2-elf*)
 	    mips_default_abi=N32_ABI
 	    ;;
Index: binutils-gdb/gold/configure.tgt
===================================================================
--- binutils-gdb.orig/gold/configure.tgt
+++ binutils-gdb/gold/configure.tgt
@@ -153,13 +153,6 @@ aarch64*-*)
  targ_big_endian=false
  targ_extra_big_endian=true
  ;;
-mips*64*el*-*-*|mips*64*le*-*-*)
- targ_obj=mips
- targ_machine=EM_MIPS_RS3_LE
- targ_size=64
- targ_big_endian=false
- targ_extra_big_endian=true
- ;;
 mips*el*-*-*|mips*le*-*-*)
  targ_obj=mips
  targ_machine=EM_MIPS_RS3_LE
@@ -167,13 +160,6 @@ mips*el*-*-*|mips*le*-*-*)
  targ_big_endian=false
  targ_extra_big_endian=true
  ;;
-mips*64*-*-*)
- targ_obj=mips
- targ_machine=EM_MIPS
- targ_size=64
- targ_big_endian=true
- targ_extra_big_endian=false
- ;;
 mips*-*-*)
  targ_obj=mips
  targ_machine=EM_MIPS
Index: binutils-gdb/ld/configure.tgt
===================================================================
--- binutils-gdb.orig/ld/configure.tgt
+++ binutils-gdb/ld/configure.tgt
@@ -580,19 +580,11 @@ mips*-*-vxworks*)	targ_emul=elf32ebmipvx
 			;;
 mips*-*-windiss)	targ_emul=elf32mipswindiss
 			;;
-mips*64*el-*-linux-gnuabi64)	targ_emul=elf64ltsmip
-			targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
-			targ_extra_libpath=$targ_extra_emuls
-			;;
-mips*64*el-*-linux-*)	targ_emul=elf32ltsmipn32
+mips64*el-*-linux-*)	targ_emul=elf32ltsmipn32
 			targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
 			targ_extra_libpath=$targ_extra_emuls
 			;;
-mips*64*-*-linux-gnuabi64)	targ_emul=elf64btsmip
-			targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
-			targ_extra_libpath=$targ_extra_emuls
-			;;
-mips*64*-*-linux-*)	targ_emul=elf32btsmipn32
+mips64*-*-linux-*)	targ_emul=elf32btsmipn32
 			targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
 			targ_extra_libpath=$targ_extra_emuls
 			;;

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

* [committed 02/16] MIPS/LD: Include n64 `.interp' with INITIAL_READONLY_SECTIONS
  2023-07-28  5:06 [committed 00/16] MIPS: Revert the change of `mipsisa64*-*-linux*' semantics Maciej W. Rozycki
  2023-07-28  5:06 ` [committed 01/16] Revert "MIPS: support mips*64 as CPU and gnuabi64 as ABI" Maciej W. Rozycki
@ 2023-07-28  5:06 ` Maciej W. Rozycki
  2023-07-28  5:06 ` [committed 03/16] MIPS/GAS/testsuite: Disable compact EH #7 tests with OpenBSD targets Maciej W. Rozycki
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Maciej W. Rozycki @ 2023-07-28  5:06 UTC (permalink / raw)
  To: Nick Clifton; +Cc: YunQiang Su, binutils

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

In ld/emulparams/elf64bmip-defs.sh there is no explicit handling of the 
`.interp' section, which causes it to be positioned in output at an odd 
place.

Let's include it with INITIAL_READONLY_SECTIONS, just like o32/n32 do, 
fixing a regression from commit 5a8e7be242f3 ("INITIAL_READONLY_SECTIONS 
in elf.sc"), where the handling of n64 was missed due to an unfortunate 
sequence of events where ld/emulparams/elf64bmip-defs.sh was only added 
with commit 94bb04b3c611 ("Use .reginfo rather than .MIPS.options in n32 
linker scripts") the day before.

Add test cases covering section ordering across the three ABIs.  This 
change also fixes ld/pr23658-2:

FAIL: Build pr23658-2

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

ld/ChangeLog:
	* emulparams/elf64bmip-defs.sh: Include `.interp' with
	INITIAL_READONLY_SECTIONS.
	* testsuite/ld-mips-elf/pie-n64.d: Adjust addresses.
	* testsuite/ld-mips-elf/sections-1-o32.rd: New test.
	* testsuite/ld-mips-elf/sections-1-o32t.rd: New test.
	* testsuite/ld-mips-elf/sections-1-n32.rd: New test.
	* testsuite/ld-mips-elf/sections-1-n32t.rd: New test.
	* testsuite/ld-mips-elf/sections-1-n32p.rd: New test.
	* testsuite/ld-mips-elf/sections-1-n64.rd: New test.
	* testsuite/ld-mips-elf/sections-1-n64t.rd: New test.
	* testsuite/ld-mips-elf/sections-2-o32.rd: New test.
	* testsuite/ld-mips-elf/sections-2-o32t.rd: New test.
	* testsuite/ld-mips-elf/sections-2-n32.rd: New test.
	* testsuite/ld-mips-elf/sections-2-n32t.rd: New test.
	* testsuite/ld-mips-elf/sections-2-n32p.rd: New test.
	* testsuite/ld-mips-elf/sections-2-n64.rd: New test.
	* testsuite/ld-mips-elf/sections-2-n64t.rd: New test.
	* testsuite/ld-mips-elf/sections.s: New test source.
	* testsuite/ld-mips-elf/mips-elf.exp: Run the new tests.
---
 ld/emulparams/elf64bmip-defs.sh             |    6 +++
 ld/testsuite/ld-mips-elf/mips-elf.exp       |   21 +++++++++++++
 ld/testsuite/ld-mips-elf/pie-n64.d          |   12 +++----
 ld/testsuite/ld-mips-elf/sections-1-n32.rd  |   36 ++++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-1-n32p.rd |   36 ++++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-1-n32t.rd |   36 ++++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-1-n64.rd  |   36 ++++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-1-n64t.rd |   36 ++++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-1-o32.rd  |   36 ++++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-1-o32t.rd |   36 ++++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-2-n32.rd  |   33 +++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-2-n32p.rd |   33 +++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-2-n32t.rd |   33 +++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-2-n64.rd  |   33 +++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-2-n64t.rd |   33 +++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-2-o32.rd  |   33 +++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-2-o32t.rd |   33 +++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections.s         |   44 ++++++++++++++++++++++++++++
 18 files changed, 559 insertions(+), 7 deletions(-)

binutils-yunqiang-mips-ld-n64-interp.diff
Index: binutils-gdb/ld/emulparams/elf64bmip-defs.sh
===================================================================
--- binutils-gdb.orig/ld/emulparams/elf64bmip-defs.sh
+++ binutils-gdb/ld/emulparams/elf64bmip-defs.sh
@@ -1,6 +1,10 @@
 source_sh ${srcdir}/emulparams/elf32bmipn32-defs.sh
 COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-INITIAL_READONLY_SECTIONS="
+INITIAL_READONLY_SECTIONS=
+if test -z "${CREATE_SHLIB}"; then
+  INITIAL_READONLY_SECTIONS=".interp       ${RELOCATING-0} : { *(.interp) }"
+fi
+INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
   .MIPS.abiflags      ${RELOCATING-0} : { *(.MIPS.abiflags) }
   .MIPS.xhash      ${RELOCATING-0} : { *(.MIPS.xhash) }
   .MIPS.options : { *(.MIPS.options) }
Index: binutils-gdb/ld/testsuite/ld-mips-elf/mips-elf.exp
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ binutils-gdb/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -1669,3 +1669,24 @@ run_dump_test_n64 "global-local-symtab-s
 run_dump_test_o32 "global-local-symtab-final-o32"
 run_dump_test_n32 "global-local-symtab-final-n32"
 run_dump_test_n64 "global-local-symtab-final-n64"
+
+# Section ordering tests.
+foreach { abi } $abis {
+    set ps2 [expr \
+	({$abi} == {"n32"} && [istarget "mips64*el-ps2-elf*"]) ? {"p"} : {""}]
+    run_ld_link_tests [list \
+	[list \
+	    "MIPS section ordering test 1 ($abi)" \
+	    "$abi_ldflags($abi) -r" "" \
+	    "$abi_asflags($abi) -mpdr" \
+	    [list sections.s] \
+	    [list "readelf -WS sections-1-${abi}${tmips}${ps2}.rd"] \
+	    "sections-1-${abi}.o"] \
+	[list \
+	    "MIPS section ordering test 2 ($abi)" \
+	    "$abi_ldflags($abi) -e 0" "" \
+	    "$abi_asflags($abi) -mpdr" \
+	    [list sections.s] \
+	    [list "readelf -WS sections-2-${abi}${tmips}${ps2}.rd"] \
+	    "sections-2-${abi}"]]
+}
Index: binutils-gdb/ld/testsuite/ld-mips-elf/pie-n64.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/pie-n64.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/pie-n64.d
@@ -2,16 +2,16 @@
 #ld: -pie
 #readelf: -d
 
-Dynamic section at offset 0x208 contains 17 entries:
+Dynamic section at offset 0x220 contains 17 entries:
   Tag * Type * Name/Value
- 0x0+00000004 \(HASH\) * 0x368
- 0x0+00000005 \(STRTAB\) * 0x3c8
- 0x0+00000006 \(SYMTAB\) * 0x380
+ 0x0+00000004 \(HASH\) * 0x380
+ 0x0+00000005 \(STRTAB\) * 0x3e0
+ 0x0+00000006 \(SYMTAB\) * 0x398
  0x0+0000000a \(STRSZ\) * 28 \(bytes\)
  0x0+0000000b \(SYMENT\) * 24 \(bytes\)
- 0x0+70000035 \(MIPS_RLD_MAP_REL\) * 0x101c8
+ 0x0+70000035 \(MIPS_RLD_MAP_REL\) * 0x101a0
  0x0+00000015 \(DEBUG\) * 0x0
- 0x0+00000003 \(PLTGOT\) * 0x10430
+ 0x0+00000003 \(PLTGOT\) * 0x10420
  0x0+70000001 \(MIPS_RLD_VERSION\) * 1
  0x0+70000005 \(MIPS_FLAGS\) * NOTPOT
  0x0+70000006 \(MIPS_BASE_ADDRESS\) * 0x0
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-n32.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-n32.rd
@@ -0,0 +1,36 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.reginfo +MIPS_REGINFO .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.pdr +PROGBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.gptab\.sbss +MIPS_GPTAB .*
+  \[..\] \.gptab\.sdata +MIPS_GPTAB .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-n32p.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-n32p.rd
@@ -0,0 +1,36 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.reginfo +MIPS_REGINFO .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.pdr +PROGBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.gptab\.sdata +MIPS_GPTAB .*
+  \[..\] \.gptab\.sbss +MIPS_GPTAB .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-n32t.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-n32t.rd
@@ -0,0 +1,36 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.reginfo +MIPS_REGINFO .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.pdr +PROGBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.gptab\.sdata +MIPS_GPTAB .*
+  \[..\] \.gptab\.sbss +MIPS_GPTAB .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-n64.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-n64.rd
@@ -0,0 +1,36 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.MIPS\.options +MIPS_OPTIONS .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.pdr +PROGBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.gptab\.sbss +MIPS_GPTAB .*
+  \[..\] \.gptab\.sdata +MIPS_GPTAB .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-n64t.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-n64t.rd
@@ -0,0 +1,36 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.MIPS\.options +MIPS_OPTIONS .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.pdr +PROGBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.gptab\.sdata +MIPS_GPTAB .*
+  \[..\] \.gptab\.sbss +MIPS_GPTAB .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-o32.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-o32.rd
@@ -0,0 +1,36 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.reginfo +MIPS_REGINFO .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.pdr +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.gptab\.sdata +MIPS_GPTAB .*
+  \[..\] \.gptab\.sbss +MIPS_GPTAB .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-o32t.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-o32t.rd
@@ -0,0 +1,36 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.reginfo +MIPS_REGINFO .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.pdr +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.gptab\.sdata +MIPS_GPTAB .*
+  \[..\] \.gptab\.sbss +MIPS_GPTAB .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-n32.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-n32.rd
@@ -0,0 +1,33 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.reginfo +MIPS_REGINFO .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-n32p.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-n32p.rd
@@ -0,0 +1,33 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.reginfo +MIPS_REGINFO .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-n32t.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-n32t.rd
@@ -0,0 +1,33 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.reginfo +MIPS_REGINFO .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-n64.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-n64.rd
@@ -0,0 +1,33 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.MIPS\.options +MIPS_OPTIONS .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-n64t.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-n64t.rd
@@ -0,0 +1,33 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.MIPS\.options +MIPS_OPTIONS .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-o32.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-o32.rd
@@ -0,0 +1,33 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.reginfo +MIPS_REGINFO .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-o32t.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-o32t.rd
@@ -0,0 +1,33 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.reginfo +MIPS_REGINFO .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections.s
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections.s
@@ -0,0 +1,44 @@
+	.section .MIPS.xhash
+	.dc.l	0
+	.section .bss
+	.dc.l	0
+	.section .data
+	.dc.l	0
+	.section .gcc_compiled_long32
+	.dc.l	0
+	.section .gcc_compiled_long64
+	.dc.l	0
+	.section .got
+	.dc.l	0
+	.section .got.plt
+	.dc.l	0
+	.section .gptab.sbss
+	.dc.l	0
+	.section .gptab.sdata
+	.dc.l	0
+	.section .interp
+	.dc.l	0
+	.section .lit4
+	.dc.l	0
+	.section .lit8
+	.dc.l	0
+	.section .mdebug.abi32
+	.dc.l	0
+	.section .mdebug.abi64
+	.dc.l	0
+	.section .mdebug.abiN32
+	.dc.l	0
+	.section .mdebug.abiO64
+	.dc.l	0
+	.section .mdebug.eabi32
+	.dc.l	0
+	.section .mdebug.eabi64
+	.dc.l	0
+	.section .rodata
+	.dc.l	0
+	.section .sbss
+	.dc.l	0
+	.section .sdata
+	.dc.l	0
+	.section .text
+	.dc.l	0

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

* [committed 03/16] MIPS/GAS/testsuite: Disable compact EH #7 tests with OpenBSD targets
  2023-07-28  5:06 [committed 00/16] MIPS: Revert the change of `mipsisa64*-*-linux*' semantics Maciej W. Rozycki
  2023-07-28  5:06 ` [committed 01/16] Revert "MIPS: support mips*64 as CPU and gnuabi64 as ABI" Maciej W. Rozycki
  2023-07-28  5:06 ` [committed 02/16] MIPS/LD: Include n64 `.interp' with INITIAL_READONLY_SECTIONS Maciej W. Rozycki
@ 2023-07-28  5:06 ` Maciej W. Rozycki
  2023-07-28  5:06 ` [committed 04/16] MIPS/LD/testsuite: Fix unaligned JALX failures " Maciej W. Rozycki
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Maciej W. Rozycki @ 2023-07-28  5:06 UTC (permalink / raw)
  To: Nick Clifton; +Cc: YunQiang Su, binutils

Compact EH #7 tests use output templates that are not suitable for the 
n64 ABI, which `mips64*-*-openbsd*' targets use by default, because the 
contents of the sections examined are expected to be differnt.  Disable 
the tests then, removing these regressions:

mips64-openbsd  -FAIL: Compact EH EB #7 with personality id and fallback FDE
mips64-openbsd  -FAIL: Compact EH EL #7 with personality id and fallback FDE
mips64el-openbsd  -FAIL: Compact EH EB #7 with personality id and fallback FDE
mips64el-openbsd  -FAIL: Compact EH EL #7 with personality id and fallback FDE

Suitable corresponding tests for the n64 ABI can be added separately.

	gas/
	* testsuite/gas/mips/compact-eh-eb-7.d: Exclude for 
	`mips64*-*-openbsd*'.
	* testsuite/gas/mips/compact-eh-el-7.d: Likewise.
---
 gas/testsuite/gas/mips/compact-eh-eb-7.d |    1 +
 gas/testsuite/gas/mips/compact-eh-el-7.d |    1 +
 2 files changed, 2 insertions(+)

binutils-mips-gas-test-compact-eh-n64.diff
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-7.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-eb-7.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-7.d
@@ -2,6 +2,7 @@
 #name: Compact EH EB #7 with personality id and fallback FDE
 #source: compact-eh-7.s
 #as: -EB -mno-pdr
+#notarget: mips64*-*-openbsd*
 
 .*:     file format.*
 
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-7.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-el-7.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-7.d
@@ -2,6 +2,7 @@
 #name: Compact EH EL #7 with personality id and fallback FDE
 #source: compact-eh-7.s
 #as: -EL -mno-pdr
+#notarget: mips64*-*-openbsd*
 
 .*:     file format.*
 

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

* [committed 04/16] MIPS/LD/testsuite: Fix unaligned JALX failures with OpenBSD targets
  2023-07-28  5:06 [committed 00/16] MIPS: Revert the change of `mipsisa64*-*-linux*' semantics Maciej W. Rozycki
                   ` (2 preceding siblings ...)
  2023-07-28  5:06 ` [committed 03/16] MIPS/GAS/testsuite: Disable compact EH #7 tests with OpenBSD targets Maciej W. Rozycki
@ 2023-07-28  5:06 ` Maciej W. Rozycki
  2023-07-28  5:06 ` [committed 05/16] MIPS/LD/testsuite: Fix JALR relaxation test failure with IRIX 6 Maciej W. Rozycki
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Maciej W. Rozycki @ 2023-07-28  5:06 UTC (permalink / raw)
  To: Nick Clifton; +Cc: YunQiang Su, binutils

There are only n64 linker emulations included with `mips64*-*-openbsd*' 
targets, however the unaligned JALX tests insist on running across all 
targets and force the n32 ABI, causing link errors with the targets 
concerned, e.g.:

./ld-new: tmpdir/unaligned-jalx-0.o: ABI is incompatible with that of the selected emulation
./ld-new: failed to merge target specific data of file tmpdir/unaligned-jalx-0.o
./ld-new: tmpdir/unaligned-insn.o: ABI is incompatible with that of the selected emulation
./ld-new: failed to merge target specific data of file tmpdir/unaligned-insn.o

Convert the tests then to use the per-ABI framework and run them for the 
o32 and n32 ABIs, removing these regressions:

mips64-openbsd  -FAIL: MIPS JALX to unaligned symbol 0
mips64-openbsd  -FAIL: MIPS JALX to unaligned symbol 1
mips64-openbsd  -FAIL: MIPS JALX to unaligned symbol 2
mips64-openbsd  -FAIL: MIPS JALX to unaligned symbol 3
mips64-openbsd  -FAIL: MIPS16 JALX to unaligned symbol 0
mips64-openbsd  -FAIL: MIPS16 JALX to unaligned symbol 1
mips64-openbsd  -FAIL: microMIPS JALX to unaligned symbol 0
mips64-openbsd  -FAIL: microMIPS JALX to unaligned symbol 1
mips64el-openbsd  -FAIL: MIPS JALX to unaligned symbol 0
mips64el-openbsd  -FAIL: MIPS JALX to unaligned symbol 1
mips64el-openbsd  -FAIL: MIPS JALX to unaligned symbol 2
mips64el-openbsd  -FAIL: MIPS JALX to unaligned symbol 3
mips64el-openbsd  -FAIL: MIPS16 JALX to unaligned symbol 0
mips64el-openbsd  -FAIL: MIPS16 JALX to unaligned symbol 1
mips64el-openbsd  -FAIL: microMIPS JALX to unaligned symbol 0
mips64el-openbsd  -FAIL: microMIPS JALX to unaligned symbol 1

Similar tests for the n64 ABI can be added separately, using suitable 
dump patterns.

	ld/
	* testsuite/ld-mips-elf/unaligned-jalx-0.d: Remove `-32' from 
	the `as' tag.
	* testsuite/ld-mips-elf/unaligned-jalx-1.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-2.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-3.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-mips16-0.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-mips16-1.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-micromips-0.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-micromips-1.d: Likewise.
	* testsuite/ld-mips-elf/mips-elf.exp: Run unaligned JALX tests
	with `run_dump_test_o32' and `run_dump_test_n32' rather than 
	`run_dump_test'.
---
 ld/testsuite/ld-mips-elf/mips-elf.exp                 |   24 ++++++++++++------
 ld/testsuite/ld-mips-elf/unaligned-jalx-0.d           |    2 -
 ld/testsuite/ld-mips-elf/unaligned-jalx-1.d           |    2 -
 ld/testsuite/ld-mips-elf/unaligned-jalx-2.d           |    2 -
 ld/testsuite/ld-mips-elf/unaligned-jalx-3.d           |    2 -
 ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-0.d |    2 -
 ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-1.d |    2 -
 ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-0.d    |    2 -
 ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-1.d    |    2 -
 9 files changed, 24 insertions(+), 16 deletions(-)

binutils-mips-ld-test-jalx.diff
Index: binutils-gdb/ld/testsuite/ld-mips-elf/mips-elf.exp
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ binutils-gdb/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -412,14 +412,22 @@ run_dump_test_n64 "bal-jalx-pic-micromip
 run_dump_test_n64 "bal-jalx-pic-ignore-n64"
 run_dump_test_n64 "bal-jalx-pic-ignore-micromips-n64"
 
-run_dump_test "unaligned-jalx-0" [list [list ld $abi_ldflags(o32)]]
-run_dump_test "unaligned-jalx-1" [list [list ld $abi_ldflags(o32)]]
-run_dump_test "unaligned-jalx-2" [list [list ld $abi_ldflags(o32)]]
-run_dump_test "unaligned-jalx-3" [list [list ld $abi_ldflags(o32)]]
-run_dump_test "unaligned-jalx-mips16-0" [list [list ld $abi_ldflags(o32)]]
-run_dump_test "unaligned-jalx-mips16-1" [list [list ld $abi_ldflags(o32)]]
-run_dump_test "unaligned-jalx-micromips-0" [list [list ld $abi_ldflags(o32)]]
-run_dump_test "unaligned-jalx-micromips-1" [list [list ld $abi_ldflags(o32)]]
+run_dump_test_o32 "unaligned-jalx-0"
+run_dump_test_n32 "unaligned-jalx-0" [list [list name (n32)]]
+run_dump_test_o32 "unaligned-jalx-1"
+run_dump_test_n32 "unaligned-jalx-1" [list [list name (n32)]]
+run_dump_test_o32 "unaligned-jalx-2"
+run_dump_test_n32 "unaligned-jalx-2" [list [list name (n32)]]
+run_dump_test_o32 "unaligned-jalx-3"
+run_dump_test_n32 "unaligned-jalx-3" [list [list name (n32)]]
+run_dump_test_o32 "unaligned-jalx-mips16-0"
+run_dump_test_n32 "unaligned-jalx-mips16-0" [list [list name (n32)]]
+run_dump_test_o32 "unaligned-jalx-mips16-1"
+run_dump_test_n32 "unaligned-jalx-mips16-1" [list [list name (n32)]]
+run_dump_test_o32 "unaligned-jalx-micromips-0"
+run_dump_test_n32 "unaligned-jalx-micromips-0" [list [list name (n32)]]
+run_dump_test_o32 "unaligned-jalx-micromips-1"
+run_dump_test_n32 "unaligned-jalx-micromips-1" [list [list name (n32)]]
 
 run_dump_test_n32 "unaligned-jalx-addend-0"
 run_dump_test_n32 "unaligned-jalx-addend-1"
Index: binutils-gdb/ld/testsuite/ld-mips-elf/unaligned-jalx-0.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-0.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/unaligned-jalx-0.d
@@ -1,7 +1,7 @@
 #name: MIPS JALX to unaligned symbol 0
 #source: unaligned-jalx-0.s
 #source: unaligned-insn.s -mips16
-#as: -EB -32
+#as: -EB
 #ld: -EB -Ttext 0x1c000000 -e 0x1c000000
 #objdump: -dr --prefix-addresses --show-raw-insn
 
Index: binutils-gdb/ld/testsuite/ld-mips-elf/unaligned-jalx-1.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-1.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/unaligned-jalx-1.d
@@ -1,7 +1,7 @@
 #name: MIPS JALX to unaligned symbol 1
 #source: unaligned-jalx-1.s
 #source: unaligned-insn.s -mips16
-#as: -EB -32
+#as: -EB
 #ld: -EB -Ttext 0x1c000000 -e 0x1c000000
 #error: \A[^\n]*: in function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): cannot convert a jump to JALX for a non-word-aligned address\Z
Index: binutils-gdb/ld/testsuite/ld-mips-elf/unaligned-jalx-2.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-2.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/unaligned-jalx-2.d
@@ -1,7 +1,7 @@
 #name: MIPS JALX to unaligned symbol 2
 #source: unaligned-jalx-2.s
 #source: unaligned-insn.s -mips16
-#as: -EB -32
+#as: -EB
 #ld: -EB -Ttext 0x1c000000 -e 0x1c000000
 #objdump: -dr --prefix-addresses --show-raw-insn
 #dump: unaligned-jalx-0.d
Index: binutils-gdb/ld/testsuite/ld-mips-elf/unaligned-jalx-3.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-3.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/unaligned-jalx-3.d
@@ -1,7 +1,7 @@
 #name: MIPS JALX to unaligned symbol 3
 #source: unaligned-jalx-3.s
 #source: unaligned-insn.s -mips16
-#as: -EB -32
+#as: -EB
 #ld: -EB -Ttext 0x1c000000 -e 0x1c000000
 #error: \A[^\n]*: in function `foo':\n
 #error:   \(\.text\+0x0\): cannot convert a branch to JALX for a non-word-aligned address\Z
Index: binutils-gdb/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-0.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-0.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-0.d
@@ -1,7 +1,7 @@
 #name: microMIPS JALX to unaligned symbol 0
 #source: unaligned-jalx-0.s -mmicromips
 #source: unaligned-insn.s
-#as: -EB -32
+#as: -EB
 #ld: -EB -Ttext 0x1c000000 -e 0x1c000000
 #objdump: -dr --prefix-addresses --show-raw-insn
 
Index: binutils-gdb/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-1.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-1.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/unaligned-jalx-micromips-1.d
@@ -1,7 +1,7 @@
 #name: microMIPS JALX to unaligned symbol 1
 #source: unaligned-jalx-1.s -mmicromips
 #source: unaligned-insn.s
-#as: -EB -32
+#as: -EB
 #ld: -EB -Ttext 0x1c000000 -e 0x1c000000
 #error: \A[^\n]*: in function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): cannot convert a jump to JALX for a non-word-aligned address\Z
Index: binutils-gdb/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-0.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-0.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-0.d
@@ -1,7 +1,7 @@
 #name: MIPS16 JALX to unaligned symbol 0
 #source: unaligned-jalx-0.s -mips16
 #source: unaligned-insn.s
-#as: -EB -32
+#as: -EB
 #ld: -EB -Ttext 0x1c000000 -e 0x1c000000
 #objdump: -dr --prefix-addresses --show-raw-insn
 
Index: binutils-gdb/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-1.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-1.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-1.d
@@ -1,7 +1,7 @@
 #name: MIPS16 JALX to unaligned symbol 1
 #source: unaligned-jalx-1.s -mips16
 #source: unaligned-insn.s
-#as: -EB -32
+#as: -EB
 #ld: -EB -Ttext 0x1c000000 -e 0x1c000000
 #error: \A[^\n]*: in function `foo':\n
 #error:   \(\.text\+0x[0-9a-f]+\): cannot convert a jump to JALX for a non-word-aligned address\Z

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

* [committed 05/16] MIPS/LD/testsuite: Fix JALR relaxation test failure with IRIX 6
  2023-07-28  5:06 [committed 00/16] MIPS: Revert the change of `mipsisa64*-*-linux*' semantics Maciej W. Rozycki
                   ` (3 preceding siblings ...)
  2023-07-28  5:06 ` [committed 04/16] MIPS/LD/testsuite: Fix unaligned JALX failures " Maciej W. Rozycki
@ 2023-07-28  5:06 ` Maciej W. Rozycki
  2023-07-28  5:06 ` [committed 06/16] MIPS/LD/testsuite: Fix `attr-gnu-4-10' failures with IRIX targets Maciej W. Rozycki
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Maciej W. Rozycki @ 2023-07-28  5:06 UTC (permalink / raw)
  To: Nick Clifton; +Cc: YunQiang Su, binutils

The `mips-sgi-irix6' target only supports IRIX linker emulations, but 
most JALR relaxation tests request the relevant traditional emulation 
instead, causing a link failure:

./ld-new: unrecognised emulation mode: elf32btsmipn32
Supported emulations: elf32bmipn32 elf32bsmip elf64bmip

This is clearly an omission from the conversion to use the per-ABI 
framework made with commit 78da84f99405 ("MIPS/LD/testsuite: Correct 
mips-elf.exp test ABI/emul/endian arrangement").  These tests are also 
endianness agnostic, which was missed in the conversion as well.

Remove the unnecessary explicit ABI and endianness options then and rely 
on the per-ABI framework to get things right, removing this regression:

mips-sgi-irix6  -FAIL: MIPS relax-jalr-shared n32

	ld/
	* testsuite/ld-mips-elf/relax-jalr-n32-shared.d: Remove flags 
	related to ABI and endianness selection from the `as' and `ld' 
	tags.
	* testsuite/ld-mips-elf/relax-jalr-n64.d: Likewise.
	* testsuite/ld-mips-elf/relax-jalr-n64-shared.d: Likewise.
	* testsuite/ld-mips-elf/mips-elf.exp: Remove `as' and `ld' tag 
	additions from the invocation of JALR relaxation tests.
---
 ld/testsuite/ld-mips-elf/mips-elf.exp            |    8 ++++----
 ld/testsuite/ld-mips-elf/relax-jalr-n32-shared.d |    4 ++--
 ld/testsuite/ld-mips-elf/relax-jalr-n64-shared.d |    4 ++--
 ld/testsuite/ld-mips-elf/relax-jalr-n64.d        |    3 +--
 4 files changed, 9 insertions(+), 10 deletions(-)

binutils-mips-ld-test-relax-jalr.diff
Index: binutils-gdb/ld/testsuite/ld-mips-elf/mips-elf.exp
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ binutils-gdb/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -499,10 +499,10 @@ if { $irix } {
     run_dump_test_n64 "elf-rel-xgot-n64" {{as -EB} {ld -EB}}
 }
 
-run_dump_test_n32 "relax-jalr-n32" {{as -EB} {ld -EB}}
-run_dump_test_n32 "relax-jalr-n32-shared" {{as -EB} {ld -EB}}
-run_dump_test_n64 "relax-jalr-n64" {{as -EB} {ld -EB}}
-run_dump_test_n64 "relax-jalr-n64-shared" {{as -EB} {ld -EB}}
+run_dump_test_n32 "relax-jalr-n32"
+run_dump_test_n32 "relax-jalr-n32-shared"
+run_dump_test_n64 "relax-jalr-n64"
+run_dump_test_n64 "relax-jalr-n64-shared"
 
 if { $linux_gnu } {
     run_dump_test_o32 "rel32-o32" {{as -EB} {ld -EB}}
Index: binutils-gdb/ld/testsuite/ld-mips-elf/relax-jalr-n32-shared.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/relax-jalr-n32-shared.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/relax-jalr-n32-shared.d
@@ -1,8 +1,8 @@
 #name: MIPS relax-jalr-shared n32
 #source: relax-jalr.s
-#as: -march=from-abi -KPIC -n32 -EB
+#as: -KPIC
 #objdump: --prefix-addresses -d --show-raw-insn
-#ld: -shared -melf32btsmipn32
+#ld: -shared
 #target: [check_shared_lib_support]
 
 .*:     file format elf.*mips.*
Index: binutils-gdb/ld/testsuite/ld-mips-elf/relax-jalr-n64-shared.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/relax-jalr-n64-shared.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/relax-jalr-n64-shared.d
@@ -1,8 +1,8 @@
 #name: MIPS relax-jalr-shared n64
 #source: relax-jalr.s
-#as: -march=from-abi -KPIC -64 -EB
+#as: -KPIC
 #objdump: --prefix-addresses -d --show-raw-insn
-#ld: -shared -melf64btsmip
+#ld: -shared
 #target: [check_shared_lib_support]
 
 .*:     file format elf.*mips.*
Index: binutils-gdb/ld/testsuite/ld-mips-elf/relax-jalr-n64.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/relax-jalr-n64.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/relax-jalr-n64.d
@@ -1,8 +1,7 @@
 #name: MIPS relax-jalr n64
 #source: relax-jalr.s
-#as: -march=from-abi -KPIC -64 -EB
+#as: -KPIC
 #objdump: --prefix-addresses -d --show-raw-insn
-#ld: -melf64btsmip
 
 .*:     file format elf.*mips.*
 

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

* [committed 06/16] MIPS/LD/testsuite: Fix `attr-gnu-4-10' failures with IRIX targets
  2023-07-28  5:06 [committed 00/16] MIPS: Revert the change of `mipsisa64*-*-linux*' semantics Maciej W. Rozycki
                   ` (4 preceding siblings ...)
  2023-07-28  5:06 ` [committed 05/16] MIPS/LD/testsuite: Fix JALR relaxation test failure with IRIX 6 Maciej W. Rozycki
@ 2023-07-28  5:06 ` Maciej W. Rozycki
  2023-07-28  5:07 ` [committed 07/16] MIPS/LD/testsuite: Fix `attr-gnu-4-10' failures with OpenBSD targets Maciej W. Rozycki
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Maciej W. Rozycki @ 2023-07-28  5:06 UTC (permalink / raw)
  To: Nick Clifton; +Cc: YunQiang Su, binutils

IRIX targets do not enable the production of a `.pdr' section in GAS by 
default, which causes a failure with the `attr-gnu-4-10' test case due 
to a difference resulting in the number and indices of sections produced
in linker output.

As the presence or absence of this section is not relevant to this test 
case, just enable it unconditionally, fixing these regressions:

mips-sgi-irix5  -FAIL: ld-mips-elf/attr-gnu-4-10
mips-sgi-irix6  -FAIL: ld-mips-elf/attr-gnu-4-10

	ld/
	* testsuite/ld-mips-elf/attr-gnu-4-10.d: Add `as' tag with 
	`-mpdr'.
---
 ld/testsuite/ld-mips-elf/attr-gnu-4-10.d |    1 +
 1 file changed, 1 insertion(+)

binutils-mips-ld-test-irix-pdr.diff
Index: binutils-gdb/ld/testsuite/ld-mips-elf/attr-gnu-4-10.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/attr-gnu-4-10.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/attr-gnu-4-10.d
@@ -1,5 +1,6 @@
 #source: attr-gnu-4-1.s
 #source: attr-gnu-4-0.s
+#as: -mpdr
 #ld: -r
 #readelf: -hA
 

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

* [committed 07/16] MIPS/LD/testsuite: Fix `attr-gnu-4-10' failures with OpenBSD targets
  2023-07-28  5:06 [committed 00/16] MIPS: Revert the change of `mipsisa64*-*-linux*' semantics Maciej W. Rozycki
                   ` (5 preceding siblings ...)
  2023-07-28  5:06 ` [committed 06/16] MIPS/LD/testsuite: Fix `attr-gnu-4-10' failures with IRIX targets Maciej W. Rozycki
@ 2023-07-28  5:07 ` Maciej W. Rozycki
  2023-07-28  5:07 ` [committed 08/16] MIPS/LD/testsuite: Run `got-dump-1' for o32/n32 ABIs Maciej W. Rozycki
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Maciej W. Rozycki @ 2023-07-28  5:07 UTC (permalink / raw)
  To: Nick Clifton; +Cc: YunQiang Su, binutils

OpenBSD targets produce ELF64 files while the pattern dump expects ELF32 
output and specific header sizes.  Disable it for `mips64*-*-openbsd*' 
for these targets then, removing these failures:

mips64-openbsd  -FAIL: ld-mips-elf/attr-gnu-4-10
mips64el-openbsd  -FAIL: ld-mips-elf/attr-gnu-4-10

	ld/
	* testsuite/ld-mips-elf/attr-gnu-4-10.d: Add `notarget' tag with 
	`mips64*-*-openbsd*'.
---
 ld/testsuite/ld-mips-elf/attr-gnu-4-10.d |    1 +
 1 file changed, 1 insertion(+)

binutils-mips-ld-test-attr-gnu-4-10-n64.diff
Index: binutils-gdb/ld/testsuite/ld-mips-elf/attr-gnu-4-10.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/attr-gnu-4-10.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/attr-gnu-4-10.d
@@ -3,6 +3,7 @@
 #as: -mpdr
 #ld: -r
 #readelf: -hA
+#notarget: mips64*-*-openbsd*
 
 ELF Header:
   Magic:   .*

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

* [committed 08/16] MIPS/LD/testsuite: Run `got-dump-1' for o32/n32 ABIs
  2023-07-28  5:06 [committed 00/16] MIPS: Revert the change of `mipsisa64*-*-linux*' semantics Maciej W. Rozycki
                   ` (6 preceding siblings ...)
  2023-07-28  5:07 ` [committed 07/16] MIPS/LD/testsuite: Fix `attr-gnu-4-10' failures with OpenBSD targets Maciej W. Rozycki
@ 2023-07-28  5:07 ` Maciej W. Rozycki
  2023-07-28  5:07 ` [committed 09/16] MIPS/GAS/testsuite: Force o32 for tests expecting 32-bit addressing Maciej W. Rozycki
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Maciej W. Rozycki @ 2023-07-28  5:07 UTC (permalink / raw)
  To: Nick Clifton; +Cc: YunQiang Su, binutils

The `got-dump-1' test case uses 32-bit addressing, so it makes no sense 
to run it with the n64 ABI.  And there is a corresponding `got-dump-2' 
test already for the n64 ABI.

Use the per-ABI framework then to run the `got-dump-1' test explicitly 
for o32 and n32 ABIs only.

	ld/
	* testsuite/ld-mips-elf/mips-elf.exp: Run `got-dump-1' for o32 
	and n32 ABIs only.
---
 ld/testsuite/ld-mips-elf/mips-elf.exp |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

binutils-mips-ld-test-got-dump-1-n64.diff
Index: binutils-gdb/ld/testsuite/ld-mips-elf/mips-elf.exp
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ binutils-gdb/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -856,7 +856,8 @@ if { $linux_gnu } {
 	     "got-page-7b.so"}
 	}]
     }
-    run_dump_test "got-dump-1"
+    run_dump_test_o32 "got-dump-1"
+    run_dump_test_n32 "got-dump-1" [list [list name (n32)]]
     run_dump_test_n64 "got-dump-2" noarch
     run_dump_test "reloc-estimate-1"
 }

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

* [committed 09/16] MIPS/GAS/testsuite: Force o32 for tests expecting 32-bit addressing
  2023-07-28  5:06 [committed 00/16] MIPS: Revert the change of `mipsisa64*-*-linux*' semantics Maciej W. Rozycki
                   ` (7 preceding siblings ...)
  2023-07-28  5:07 ` [committed 08/16] MIPS/LD/testsuite: Run `got-dump-1' for o32/n32 ABIs Maciej W. Rozycki
@ 2023-07-28  5:07 ` Maciej W. Rozycki
  2023-07-28  5:07 ` [committed 10/16] MIPS/LD/testsuite: Fix MIPS16 interlinking test n64 regressions Maciej W. Rozycki
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Maciej W. Rozycki @ 2023-07-28  5:07 UTC (permalink / raw)
  To: Nick Clifton; +Cc: YunQiang Su, binutils

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

A few GAS tests expect to be assembled with 32-bit addressing, otherwise 
causing an assembly warning:

.../gas/testsuite/gas/mips/fix-rm7000-2.s:11: Warning: la used to load 64-bit address; recommend using dla instead

or pattern dump mismatches against 32-bit address calculations, however 
these tests do not enforce their expectation in any.  For none of them 
the specific ABI used is of any relevance however, so select the o32 ABI
unconditionally, removing these failures with OpenBSD targets:

mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (micromips)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips3)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips4)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips5)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips64)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips64r2)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips64r3)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips64r5)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (octeon)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (octeon2)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (octeon3)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (octeonp)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (r4000)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (sb1)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (vr5400)
mips64-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (xlr)
mips64-openbsd  -FAIL: MIPS-OCTEON octeon_saa_saad (octeon2)
mips64-openbsd  -FAIL: MIPS-OCTEON octeon_saa_saad (octeon3)
mips64-openbsd  -FAIL: MIPS-OCTEON octeon_saa_saad (octeonp)
mips64-openbsd  -FAIL: Full MIPS R5900
mips64-openbsd  -FAIL: MIPS R5900 VU0
mips64-openbsd  -FAIL: Paired LL/SC for mips64r6 (mips64r6)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (micromips)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips3)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips4)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips5)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips64)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips64r2)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips64r3)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (mips64r5)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (octeon)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (octeon2)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (octeon3)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (octeonp)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (r4000)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (sb1)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (vr5400)
mips64el-openbsd  -FAIL: MIPS RM7000 workarounds test 2 (xlr)
mips64el-openbsd  -FAIL: MIPS-OCTEON octeon_saa_saad (octeon2)
mips64el-openbsd  -FAIL: MIPS-OCTEON octeon_saa_saad (octeon3)
mips64el-openbsd  -FAIL: MIPS-OCTEON octeon_saa_saad (octeonp)
mips64el-openbsd  -FAIL: Full MIPS R5900
mips64el-openbsd  -FAIL: MIPS R5900 VU0
mips64el-openbsd  -FAIL: Paired LL/SC for mips64r6 (mips64r6)

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

	gas/
	* testsuite/gas/mips/fix-rm7000-2.d: Add `-32' to the `as' tag.
	* testsuite/gas/mips/micromips@fix-rm7000-2.d: Likewise.
	* testsuite/gas/mips/r5900-full.d: Likewise.
	* testsuite/gas/mips/r5900-vu0.d: Likewise.
	* testsuite/gas/mips/llpscp-64.d: Add `as' tag with `-32'.
	* testsuite/gas/mips/octeon-saa-saad.d: Likewise.
---
 gas/testsuite/gas/mips/fix-rm7000-2.d           |    2 +-
 gas/testsuite/gas/mips/llpscp-64.d              |    1 +
 gas/testsuite/gas/mips/micromips@fix-rm7000-2.d |    2 +-
 gas/testsuite/gas/mips/octeon-saa-saad.d        |    1 +
 gas/testsuite/gas/mips/r5900-full.d             |    2 +-
 gas/testsuite/gas/mips/r5900-vu0.d              |    2 +-
 6 files changed, 6 insertions(+), 4 deletions(-)

binutils-yunqiang-mips-test-gas-o32.diff
Index: binutils-gdb/gas/testsuite/gas/mips/fix-rm7000-2.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/fix-rm7000-2.d
+++ binutils-gdb/gas/testsuite/gas/mips/fix-rm7000-2.d
@@ -1,4 +1,4 @@
-#as: -mfix-rm7000
+#as: -32 -mfix-rm7000
 #objdump: -dz --prefix-addresses
 #name: MIPS RM7000 workarounds test 2
 #source: fix-rm7000-2.s
Index: binutils-gdb/gas/testsuite/gas/mips/llpscp-64.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/llpscp-64.d
+++ binutils-gdb/gas/testsuite/gas/mips/llpscp-64.d
@@ -1,4 +1,5 @@
 #objdump: -dr
+#as: -32
 #name: Paired LL/SC for mips64r6
 
 .*: +file format .*
Index: binutils-gdb/gas/testsuite/gas/mips/micromips@fix-rm7000-2.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/micromips@fix-rm7000-2.d
+++ binutils-gdb/gas/testsuite/gas/mips/micromips@fix-rm7000-2.d
@@ -1,4 +1,4 @@
-#as: -mfix-rm7000
+#as: -32 -mfix-rm7000
 #objdump: -dz --prefix-addresses
 #name: MIPS RM7000 workarounds test 2
 #source: fix-rm7000-2.s
Index: binutils-gdb/gas/testsuite/gas/mips/octeon-saa-saad.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/octeon-saa-saad.d
+++ binutils-gdb/gas/testsuite/gas/mips/octeon-saa-saad.d
@@ -1,4 +1,5 @@
 #objdump: -d -r --show-raw-insn
+#as: -32
 #name: MIPS-OCTEON octeon_saa_saad
 
 .*: +file format .*mips.*
Index: binutils-gdb/gas/testsuite/gas/mips/r5900-full.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/r5900-full.d
+++ binutils-gdb/gas/testsuite/gas/mips/r5900-full.d
@@ -1,6 +1,6 @@
 #objdump: -dr --prefix-addresses --show-raw-insn -M gpr-names=numeric -mmips:5900
 #name: Full MIPS R5900
-#as: -march=r5900 -mtune=r5900
+#as: -32 -march=r5900 -mtune=r5900
 
 .*: +file format .*mips.*
 
Index: binutils-gdb/gas/testsuite/gas/mips/r5900-vu0.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/r5900-vu0.d
+++ binutils-gdb/gas/testsuite/gas/mips/r5900-vu0.d
@@ -1,6 +1,6 @@
 #objdump: -dr --prefix-addresses --show-raw-insn -M gpr-names=numeric -mmips:5900
 #name: MIPS R5900 VU0
-#as: -march=r5900
+#as: -32 -march=r5900
 
 .*: +file format .*mips.*
 

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

* [committed 10/16] MIPS/LD/testsuite: Fix MIPS16 interlinking test n64 regressions
  2023-07-28  5:06 [committed 00/16] MIPS: Revert the change of `mipsisa64*-*-linux*' semantics Maciej W. Rozycki
                   ` (8 preceding siblings ...)
  2023-07-28  5:07 ` [committed 09/16] MIPS/GAS/testsuite: Force o32 for tests expecting 32-bit addressing Maciej W. Rozycki
@ 2023-07-28  5:07 ` Maciej W. Rozycki
  2023-07-28  5:07 ` [committed 11/16] MIPS/LD/testsuite: Fix MIPS16 interlinking test IRIX 6 regressions Maciej W. Rozycki
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Maciej W. Rozycki @ 2023-07-28  5:07 UTC (permalink / raw)
  To: Nick Clifton; +Cc: YunQiang Su, binutils

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

The MIPS16 interlinking test for local functions expects to be assembled 
with 32-bit addressing, otherwise causing assembly warnings:

.../ld/testsuite/ld-mips-elf/mips16-local-stubs-1.s: Assembler messages:
.../ld/testsuite/ld-mips-elf/mips16-local-stubs-1.s:16: Warning: la used to load 64-bit address; recommend using dla instead

Use the per-ABI framework then to run the test explicitly for o32 and 
n32 ABIs only, replacing the `-mips4' option from the `as' tag with 
`.module mips4' pseudo-op within the source itself so as to avoid 
assembly errors:

Assembler messages:
Error: -mips4 conflicts with the other architecture options, which imply -mips3

with n32 testing for some targets, and ultimately removing these 
regressions:

mips64-openbsd  -FAIL: MIPS16 interlinking for local functions 1
mips64el-openbsd  -FAIL: MIPS16 interlinking for local functions 1

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

	ld/
	* testsuite/ld-mips-elf/mips16-local-stubs-1.d: Remove `-mips4' 
	from the `as' tag.
	* testsuite/ld-mips-elf/mips16-local-stubs-1.s: Add `.module 
	mips4'.
	* testsuite/ld-mips-elf/mips-elf.exp: Run `mips16-local-stubs-1'
	for o32 and n32 ABIs only.
---
 ld/testsuite/ld-mips-elf/mips-elf.exp           |    3 ++-
 ld/testsuite/ld-mips-elf/mips16-local-stubs-1.d |    1 -
 ld/testsuite/ld-mips-elf/mips16-local-stubs-1.s |    2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

binutils-yunqiang-ld-test-mips16-local-stubs-1-n64.diff
Index: binutils-gdb/ld/testsuite/ld-mips-elf/mips-elf.exp
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ binutils-gdb/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -1047,7 +1047,8 @@ if { $has_abi(o32) } {
     run_ld_link_tests $mips16_intermix_test
 }
 
-run_dump_test "mips16-local-stubs-1"
+run_dump_test_o32 "mips16-local-stubs-1"
+run_dump_test_n32 "mips16-local-stubs-1" [list [list name (n32)]]
 
 set mips16_fp_stub_test [list \
     [list "Floating-point stub for mips16 functions" \
Index: binutils-gdb/ld/testsuite/ld-mips-elf/mips16-local-stubs-1.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/mips16-local-stubs-1.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/mips16-local-stubs-1.d
@@ -1,6 +1,5 @@
 #name: MIPS16 interlinking for local functions 1
 #source: mips16-local-stubs-1.s
-#as: -mips4
 #ld: -Ttext 0x20000000 -e caller1
 #objdump: -dr
 #...
Index: binutils-gdb/ld/testsuite/ld-mips-elf/mips16-local-stubs-1.s
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/mips16-local-stubs-1.s
+++ binutils-gdb/ld/testsuite/ld-mips-elf/mips16-local-stubs-1.s
@@ -1,3 +1,5 @@
+	.module	mips4
+
 	.macro	makestub,type,func,section
 	.text
 	.set	\type

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

* [committed 11/16] MIPS/LD/testsuite: Fix MIPS16 interlinking test IRIX 6 regressions
  2023-07-28  5:06 [committed 00/16] MIPS: Revert the change of `mipsisa64*-*-linux*' semantics Maciej W. Rozycki
                   ` (9 preceding siblings ...)
  2023-07-28  5:07 ` [committed 10/16] MIPS/LD/testsuite: Fix MIPS16 interlinking test n64 regressions Maciej W. Rozycki
@ 2023-07-28  5:07 ` Maciej W. Rozycki
  2023-07-28  5:07 ` [committed 12/16] testsuite: Also discard the `.MIPS.options' section Maciej W. Rozycki
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Maciej W. Rozycki @ 2023-07-28  5:07 UTC (permalink / raw)
  To: Nick Clifton; +Cc: YunQiang Su, binutils

IRIX 6 does not have MIPS16 stub section support in its n32 linker 
scripts, causing such input sections to be propagated to the respective 
output sections rather than `.text', causing dump pattern mismatches.

Expect IRIX 6 to fail with n32 testing then, removing this regression:

mips-sgi-irix6  -FAIL: MIPS16 interlinking for local functions 1 (n32)

We may choose to update IRIX 6 n32 linker scripts sometime, as it seems 
a harmless change.

	ld/
	* testsuite/ld-mips-elf/mips-elf.exp: Expect IRIX 6 to fail with
	n32 `mips16-local-stubs-1' testing.
---
 ld/testsuite/ld-mips-elf/mips-elf.exp |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

binutils-ld-test-mips16-local-stubs-1-irix6.diff
Index: binutils-gdb/ld/testsuite/ld-mips-elf/mips-elf.exp
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ binutils-gdb/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -1048,7 +1048,8 @@ if { $has_abi(o32) } {
 }
 
 run_dump_test_o32 "mips16-local-stubs-1"
-run_dump_test_n32 "mips16-local-stubs-1" [list [list name (n32)]]
+run_dump_test_n32 "mips16-local-stubs-1" [list [list name (n32)] \
+					       [list xfail *-*-irix6*]]
 
 set mips16_fp_stub_test [list \
     [list "Floating-point stub for mips16 functions" \

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

* [committed 12/16] testsuite: Also discard the `.MIPS.options' section
  2023-07-28  5:06 [committed 00/16] MIPS: Revert the change of `mipsisa64*-*-linux*' semantics Maciej W. Rozycki
                   ` (10 preceding siblings ...)
  2023-07-28  5:07 ` [committed 11/16] MIPS/LD/testsuite: Fix MIPS16 interlinking test IRIX 6 regressions Maciej W. Rozycki
@ 2023-07-28  5:07 ` Maciej W. Rozycki
  2023-07-28  5:07 ` [committed 13/16] MIPS/testsuite: Handle 64-bit addresses Maciej W. Rozycki
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Maciej W. Rozycki @ 2023-07-28  5:07 UTC (permalink / raw)
  To: Nick Clifton; +Cc: YunQiang Su, binutils

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

Also discard the `.MIPS.options' section, used with n64 MIPS binaries, 
along with similar other MIPS sections (`.reginfo', `.MIPS.abiflags') 
not relevant for the test cases concerned, fixing these regressions:

mips64-openbsd  -FAIL: ld-elf/group3a
mips64-openbsd  -FAIL: ld-elf/group3b
mips64-openbsd  -FAIL: Place orphan sections (map file check)
mips64-openbsd  -FAIL: ld-elf/orphan-region
mips64-openbsd  -FAIL: ld-elf/orphan
mips64-openbsd  -FAIL: overlay size (map file check)
mips64-openbsd  -FAIL: overlay size
mips64el-openbsd  -FAIL: ld-elf/group3a
mips64el-openbsd  -FAIL: ld-elf/group3b
mips64el-openbsd  -FAIL: Place orphan sections (map file check)
mips64el-openbsd  -FAIL: ld-elf/orphan-region
mips64el-openbsd  -FAIL: ld-elf/orphan
mips64el-openbsd  -FAIL: overlay size (map file check)
mips64el-openbsd  -FAIL: overlay size

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

	binutils/
	* testsuite/binutils-all/strip-3.d: Add `-R .MIPS.options' to 
	the `strip' tag.

	ld/
	* testsuite/ld-elf/group.ld: Also discard `.MIPS.options'.
	* testsuite/ld-elf/orphan-region.ld: Likewise.
	* testsuite/ld-elf/orphan.ld: Likewise.
	* testsuite/ld-mips-elf/got-page-1.ld: Likewise.
	* testsuite/ld-scripts/overlay-size.t: Likewise.
---
 binutils/testsuite/binutils-all/strip-3.d |    2 +-
 ld/testsuite/ld-elf/group.ld              |    2 +-
 ld/testsuite/ld-elf/orphan-region.ld      |    2 +-
 ld/testsuite/ld-elf/orphan.ld             |    2 +-
 ld/testsuite/ld-mips-elf/got-page-1.ld    |    2 +-
 ld/testsuite/ld-scripts/overlay-size.t    |    2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

binutils-yunqiang-test-mips-options.diff
Index: binutils-gdb/binutils/testsuite/binutils-all/strip-3.d
===================================================================
--- binutils-gdb.orig/binutils/testsuite/binutils-all/strip-3.d
+++ binutils-gdb/binutils/testsuite/binutils-all/strip-3.d
@@ -1,6 +1,6 @@
 #PROG: strip
 #source: empty.s
-#strip: -R .text -R .data -R .bss -R .ARM.attributes -R .reginfo -R .gnu.attributes -R .MIPS.abiflags -R .pdr -R .xtensa.info -R .ARC.attributes -R .note.gnu.property -R .riscv.attributes -R .csky.attributes
+#strip: -R .text -R .data -R .bss -R .ARM.attributes -R .reginfo -R .gnu.attributes -R .MIPS.abiflags -R .MIPS.options -R .pdr -R .xtensa.info -R .ARC.attributes -R .note.gnu.property -R .riscv.attributes -R .csky.attributes
 #readelf: -S --wide
 #name: strip empty file
 #target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
Index: binutils-gdb/ld/testsuite/ld-elf/group.ld
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-elf/group.ld
+++ binutils-gdb/ld/testsuite/ld-elf/group.ld
@@ -8,5 +8,5 @@ SECTIONS
 {
   . = 0x1000;
   .text : { *(.text) *(.rodata.brlt) } :image :header
-  /DISCARD/ : { *(.dropme) *(.reginfo) *(.MIPS.abiflags) }
+  /DISCARD/ : { *(.dropme) *(.reginfo) *(.MIPS.abiflags) *(.MIPS.options) }
 }
Index: binutils-gdb/ld/testsuite/ld-elf/orphan-region.ld
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-elf/orphan-region.ld
+++ binutils-gdb/ld/testsuite/ld-elf/orphan-region.ld
@@ -7,5 +7,5 @@ SECTIONS
 {
 	.text : ALIGN (4) { *(.text) } > region
 	.rodata : ALIGN (4) { *(.rodata) } > region
-	/DISCARD/ : { *(.reginfo) *(.MIPS.abiflags) *(.trampolines) *(.riscv.attributes) }
+	/DISCARD/ : { *(.reginfo) *(.MIPS.abiflags) *(.MIPS.options) *(.trampolines) *(.riscv.attributes) }
 }
Index: binutils-gdb/ld/testsuite/ld-elf/orphan.ld
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-elf/orphan.ld
+++ binutils-gdb/ld/testsuite/ld-elf/orphan.ld
@@ -6,5 +6,5 @@ SECTIONS
   .bss : { *(.bss) *(COMMON) }
   .sbss : { *(.sbss) }
   .note : { *(.note) }
-  /DISCARD/ : { *(.reginfo) *(.MIPS.abiflags) *(.trampolines) }
+  /DISCARD/ : { *(.reginfo) *(.MIPS.abiflags) *(.MIPS.options) *(.trampolines) }
 }
Index: binutils-gdb/ld/testsuite/ld-mips-elf/got-page-1.ld
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/got-page-1.ld
+++ binutils-gdb/ld/testsuite/ld-mips-elf/got-page-1.ld
@@ -22,7 +22,7 @@ SECTIONS
   . = ALIGN (0x400);
   .bss : { *(.bss .bss.*) }
 
-  /DISCARD/ : { *(.reginfo) *(.MIPS.abiflags) }
+  /DISCARD/ : { *(.reginfo) *(.MIPS.abiflags) *(.MIPS.options) }
 }
 
 VERSION
Index: binutils-gdb/ld/testsuite/ld-scripts/overlay-size.t
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-scripts/overlay-size.t
+++ binutils-gdb/ld/testsuite/ld-scripts/overlay-size.t
@@ -60,5 +60,5 @@ SECTIONS
   end_of_data_overlays = . ;
   
   . = 0x8000;
-  /DISCARD/ : { *(.reginfo) *(.MIPS.abiflags) }
+  /DISCARD/ : { *(.reginfo) *(.MIPS.abiflags) *(.MIPS.options) }
 }

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

* [committed 13/16] MIPS/testsuite: Handle 64-bit addresses
  2023-07-28  5:06 [committed 00/16] MIPS: Revert the change of `mipsisa64*-*-linux*' semantics Maciej W. Rozycki
                   ` (11 preceding siblings ...)
  2023-07-28  5:07 ` [committed 12/16] testsuite: Also discard the `.MIPS.options' section Maciej W. Rozycki
@ 2023-07-28  5:07 ` Maciej W. Rozycki
  2023-07-28  5:07 ` [committed 14/16] testsuite: Handle composed R_MIPS_NONE relocations Maciej W. Rozycki
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Maciej W. Rozycki @ 2023-07-28  5:07 UTC (permalink / raw)
  To: Nick Clifton; +Cc: YunQiang Su, binutils

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

Several MIPS test cases are suitable for the n64 ABI if not for the 
extra leading zeros or spaces in addresses not handled by dump patterns.  
Match the characters then, removing these regressions:

mips64-openbsd  -FAIL: .set arch=FOO
mips64-openbsd  -FAIL: ST Microelectronics Loongson-2F workarounds of nop issue
mips64-openbsd  -FAIL: MIPS DSP ASE for MIPS64
mips64-openbsd  -FAIL: gas/mips/align2
mips64-openbsd  -FAIL: gas/mips/align2-el
mips64-openbsd  -FAIL: Locally-resolvable PC-relative code references
mips64-openbsd  -FAIL: MIPS jalx-1
mips64-openbsd  -FAIL: JAL overflow 2
mips64el-openbsd  -FAIL: .set arch=FOO
mips64el-openbsd  -FAIL: ST Microelectronics Loongson-2F workarounds of nop issue
mips64el-openbsd  -FAIL: MIPS DSP ASE for MIPS64
mips64el-openbsd  -FAIL: gas/mips/align2
mips64el-openbsd  -FAIL: gas/mips/align2-el
mips64el-openbsd  -FAIL: Locally-resolvable PC-relative code references
mips64el-openbsd  -FAIL: MIPS jalx-1
mips64el-openbsd  -FAIL: JAL overflow 2

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

	gas/
	* testsuite/gas/mips/align2-el.d: Match extra leading zeros 
	with addresses.
	* testsuite/gas/mips/align2.d: Likewise.
	* testsuite/gas/mips/compact-eh-eb-1.d: Likewise.
	* testsuite/gas/mips/compact-eh-eb-2.d: Likewise.
	* testsuite/gas/mips/compact-eh-eb-3.d: Likewise.
	* testsuite/gas/mips/compact-eh-eb-4.d: Likewise.
	* testsuite/gas/mips/compact-eh-eb-5.d: Likewise.
	* testsuite/gas/mips/compact-eh-eb-6.d: Likewise.
	* testsuite/gas/mips/compact-eh-el-1.d: Likewise.
	* testsuite/gas/mips/compact-eh-el-2.d: Likewise.
	* testsuite/gas/mips/compact-eh-el-3.d: Likewise.
	* testsuite/gas/mips/compact-eh-el-4.d: Likewise.
	* testsuite/gas/mips/compact-eh-el-5.d: Likewise.
	* testsuite/gas/mips/compact-eh-el-6.d: Likewise.
	* testsuite/gas/mips/loongson-2f-2.d: Likewise.
	* testsuite/gas/mips/loongson-2f-3.d: Likewise.
	* testsuite/gas/mips/mips-jalx.d: Likewise.
	* testsuite/gas/mips/mips64-dsp.d: Likewise.
	* testsuite/gas/mips/pcrel-1.d: Likewise.
	* testsuite/gas/mips/set-arch.d: Likewise.

	ld/
	* testsuite/ld-mips-elf/jaloverflow-2.d: Match extra leading 
	zeros and spaces with addresses as appropriate.
	* testsuite/ld-mips-elf/jalx-1.d: Likewise.
	* testsuite/ld-mips-elf/reloc-estimate-1.d: Likewise.
---
 gas/testsuite/gas/mips/align2-el.d          |    8 
 gas/testsuite/gas/mips/align2.d             |    8 
 gas/testsuite/gas/mips/compact-eh-eb-1.d    |    2 
 gas/testsuite/gas/mips/compact-eh-eb-2.d    |    8 
 gas/testsuite/gas/mips/compact-eh-eb-3.d    |    4 
 gas/testsuite/gas/mips/compact-eh-eb-4.d    |    4 
 gas/testsuite/gas/mips/compact-eh-eb-5.d    |    8 
 gas/testsuite/gas/mips/compact-eh-eb-6.d    |    4 
 gas/testsuite/gas/mips/compact-eh-el-1.d    |    2 
 gas/testsuite/gas/mips/compact-eh-el-2.d    |    8 
 gas/testsuite/gas/mips/compact-eh-el-3.d    |    4 
 gas/testsuite/gas/mips/compact-eh-el-4.d    |    4 
 gas/testsuite/gas/mips/compact-eh-el-5.d    |    8 
 gas/testsuite/gas/mips/compact-eh-el-6.d    |    4 
 gas/testsuite/gas/mips/loongson-2f-2.d      |    2 
 gas/testsuite/gas/mips/loongson-2f-3.d      |    2 
 gas/testsuite/gas/mips/mips-jalx.d          |    2 
 gas/testsuite/gas/mips/mips64-dsp.d         |    2 
 gas/testsuite/gas/mips/pcrel-1.d            |    4 
 gas/testsuite/gas/mips/set-arch.d           |  718 ++++++++++++++--------------
 ld/testsuite/ld-mips-elf/jaloverflow-2.d    |    2 
 ld/testsuite/ld-mips-elf/jalx-1.d           |   10 
 ld/testsuite/ld-mips-elf/reloc-estimate-1.d |    4 
 23 files changed, 411 insertions(+), 411 deletions(-)

binutils-yunqiang-mips-test-address-size.diff
Index: binutils-gdb/gas/testsuite/gas/mips/align2-el.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/align2-el.d
+++ binutils-gdb/gas/testsuite/gas/mips/align2-el.d
@@ -6,7 +6,7 @@
 
 Disassembly of section \.text:
 
-00000000 <f1>:
+0+000000 <f1>:
    0:	4a01      	addiu	v0,1
    2:	6500      	nop
    4:	6500      	nop
@@ -14,14 +14,14 @@
    8:	4b01      	addiu	v1,1
    a:	6500      	nop
 
-0000000c <f2>:
+0+00000c <f2>:
    c:	24420001 	addiu	v0,v0,1
   10:	24630001 	addiu	v1,v1,1
 	\.\.\.
   20:	24840001 	addiu	a0,a0,1
   24:	00000000 	nop
 
-00000028 <f3>:
+0+000028 <f3>:
   28:	4001      	addiu	s0,s0,1
   2a:	6500      	nop
   2c:	6500      	nop
@@ -37,6 +37,6 @@
 
 Disassembly of section \.text\.a:
 
-00000000 <f4>:
+0+000000 <f4>:
    0:	24a50001 	addiu	a1,a1,1
 	\.\.\.
Index: binutils-gdb/gas/testsuite/gas/mips/align2.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/align2.d
+++ binutils-gdb/gas/testsuite/gas/mips/align2.d
@@ -5,7 +5,7 @@
 
 Disassembly of section \.text:
 
-00000000 <f1>:
+0+000000 <f1>:
    0:	4a01      	addiu	v0,1
    2:	6500      	nop
    4:	6500      	nop
@@ -13,14 +13,14 @@
    8:	4b01      	addiu	v1,1
    a:	6500      	nop
 
-0000000c <f2>:
+0+00000c <f2>:
    c:	24420001 	addiu	v0,v0,1
   10:	24630001 	addiu	v1,v1,1
 	\.\.\.
   20:	24840001 	addiu	a0,a0,1
   24:	00000000 	nop
 
-00000028 <f3>:
+0+000028 <f3>:
   28:	4001      	addiu	s0,s0,1
   2a:	6500      	nop
   2c:	6500      	nop
@@ -36,6 +36,6 @@
 
 Disassembly of section \.text\.a:
 
-00000000 <f4>:
+0+000000 <f4>:
    0:	24a50001 	addiu	a1,a1,1
 	\.\.\.
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-1.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-eb-1.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-1.d
@@ -8,7 +8,7 @@
 
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
-00000000 R_MIPS_PC32       .text.*
+0+000000 R_MIPS_PC32       .text.*
 
 
 Contents of section .text:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-2.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-eb-2.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-2.d
@@ -8,18 +8,18 @@
 
 RELOCATION RECORDS FOR \[.data.DW.ref.__gnu_compact_pr2\]:
 OFFSET +TYPE +VALUE
-00000000 R_MIPS_32         __gnu_compact_pr2
+0+000000 R_MIPS_32         __gnu_compact_pr2
 
 
 RELOCATION RECORDS FOR \[.gnu_extab\]:
 OFFSET +TYPE +VALUE
-00000001 R_MIPS_PC32       DW.ref.__gnu_compact_pr2
+0+000001 R_MIPS_PC32       DW.ref.__gnu_compact_pr2
 
 
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
-00000000 R_MIPS_PC32       .text.*
-00000004 R_MIPS_PC32       .gnu_extab
+0+000000 R_MIPS_PC32       .text.*
+0+000004 R_MIPS_PC32       .gnu_extab
 
 
 Contents of section .group:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-3.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-eb-3.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-3.d
@@ -8,8 +8,8 @@
 
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
-00000000 R_MIPS_PC32       .text.*
-00000004 R_MIPS_PC32       .gnu_extab
+0+000000 R_MIPS_PC32       .text.*
+0+000004 R_MIPS_PC32       .gnu_extab
 
 
 Contents of section .text:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-4.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-eb-4.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-4.d
@@ -8,8 +8,8 @@
 
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
-00000000 R_MIPS_PC32       .text.*
-00000004 R_MIPS_PC32       .gnu_extab
+0+000000 R_MIPS_PC32       .text.*
+0+000004 R_MIPS_PC32       .gnu_extab
 
 
 Contents of section .text:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-5.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-eb-5.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-5.d
@@ -8,18 +8,18 @@
 
 RELOCATION RECORDS FOR \[.data.DW.ref.__gnu_compact_pr2\]:
 OFFSET +TYPE +VALUE
-00000000 R_MIPS_32         __gnu_compact_pr2
+0+000000 R_MIPS_32         __gnu_compact_pr2
 
 
 RELOCATION RECORDS FOR \[.gnu_extab\]:
 OFFSET +TYPE +VALUE
-00000001 R_MIPS_PC32       DW.ref.__gnu_compact_pr2
+0+000001 R_MIPS_PC32       DW.ref.__gnu_compact_pr2
 
 
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
-00000000 R_MIPS_PC32       .text.*
-00000004 R_MIPS_PC32       .gnu_extab
+0+000000 R_MIPS_PC32       .text.*
+0+000004 R_MIPS_PC32       .gnu_extab
 
 
 Contents of section .group:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-6.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-eb-6.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-6.d
@@ -8,8 +8,8 @@
 
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
-00000000 R_MIPS_PC32       .text.*
-00000004 R_MIPS_PC32       .gnu_extab
+0+000000 R_MIPS_PC32       .text.*
+0+000004 R_MIPS_PC32       .gnu_extab
 
 
 Contents of section .text:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-1.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-el-1.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-1.d
@@ -8,7 +8,7 @@
 
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
-00000000 R_MIPS_PC32       .text.*
+0+000000 R_MIPS_PC32       .text.*
 
 
 Contents of section .text:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-2.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-el-2.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-2.d
@@ -8,18 +8,18 @@
 
 RELOCATION RECORDS FOR \[.data.DW.ref.__gnu_compact_pr2\]:
 OFFSET +TYPE +VALUE
-00000000 R_MIPS_32         __gnu_compact_pr2
+0+000000 R_MIPS_32         __gnu_compact_pr2
 
 
 RELOCATION RECORDS FOR \[.gnu_extab\]:
 OFFSET +TYPE +VALUE
-00000001 R_MIPS_PC32       DW.ref.__gnu_compact_pr2
+0+000001 R_MIPS_PC32       DW.ref.__gnu_compact_pr2
 
 
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
-00000000 R_MIPS_PC32       .text.*
-00000004 R_MIPS_PC32       .gnu_extab
+0+000000 R_MIPS_PC32       .text.*
+0+000004 R_MIPS_PC32       .gnu_extab
 
 
 Contents of section .group:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-3.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-el-3.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-3.d
@@ -8,8 +8,8 @@
 
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
-00000000 R_MIPS_PC32       .text.*
-00000004 R_MIPS_PC32       .gnu_extab
+0+000000 R_MIPS_PC32       .text.*
+0+000004 R_MIPS_PC32       .gnu_extab
 
 
 Contents of section .text:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-4.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-el-4.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-4.d
@@ -8,8 +8,8 @@
 
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
-00000000 R_MIPS_PC32       .text.*
-00000004 R_MIPS_PC32       .gnu_extab
+0+000000 R_MIPS_PC32       .text.*
+0+000004 R_MIPS_PC32       .gnu_extab
 
 
 Contents of section .text:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-5.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-el-5.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-5.d
@@ -7,18 +7,18 @@
 
 RELOCATION RECORDS FOR \[.data.DW.ref.__gnu_compact_pr2\]:
 OFFSET +TYPE +VALUE
-00000000 R_MIPS_32         __gnu_compact_pr2
+0+000000 R_MIPS_32         __gnu_compact_pr2
 
 
 RELOCATION RECORDS FOR \[.gnu_extab\]:
 OFFSET +TYPE +VALUE
-00000001 R_MIPS_PC32       DW.ref.__gnu_compact_pr2
+0+000001 R_MIPS_PC32       DW.ref.__gnu_compact_pr2
 
 
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
-00000000 R_MIPS_PC32       .text.*
-00000004 R_MIPS_PC32       .gnu_extab
+0+000000 R_MIPS_PC32       .text.*
+0+000004 R_MIPS_PC32       .gnu_extab
 
 
 Contents of section .group:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-6.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-el-6.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-6.d
@@ -8,8 +8,8 @@
 
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
-00000000 R_MIPS_PC32       .text.*
-00000004 R_MIPS_PC32       .gnu_extab
+0+000000 R_MIPS_PC32       .text.*
+0+000004 R_MIPS_PC32       .gnu_extab
 
 
 Contents of section .text:
Index: binutils-gdb/gas/testsuite/gas/mips/loongson-2f-2.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/loongson-2f-2.d
+++ binutils-gdb/gas/testsuite/gas/mips/loongson-2f-2.d
@@ -6,7 +6,7 @@
 
 Disassembly of section .text:
 
-00000000 <loongson2f_nop_insn>:
+0+000000 <loongson2f_nop_insn>:
    0:	00200825 	move	\$1,\$1
    4:	00200825 	move	\$1,\$1
    8:	00200825 	move	\$1,\$1
Index: binutils-gdb/gas/testsuite/gas/mips/loongson-2f-3.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/loongson-2f-3.d
+++ binutils-gdb/gas/testsuite/gas/mips/loongson-2f-3.d
@@ -6,7 +6,7 @@
 
 Disassembly of section .text:
 
-00000000 <.text>:
+0+000000 <.text>:
    0:	3c01cfff 	lui	\$1,0xcfff
    4:	3421ffff 	ori	\$1,\$1,0xffff
    8:	03c1f024 	and	\$30,\$30,\$1
Index: binutils-gdb/gas/testsuite/gas/mips/mips-jalx.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/mips-jalx.d
+++ binutils-gdb/gas/testsuite/gas/mips/mips-jalx.d
@@ -3,7 +3,7 @@
 #name: mips jalx
 .*:     file format .*
 Disassembly of section .text:
-00000000 <.text>:
+0+000000 <.text>:
    0:	74000000 	jalx	0x0
 			0: R_MIPS_26	external_label
    4:	00000000 	nop
Index: binutils-gdb/gas/testsuite/gas/mips/mips64-dsp.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/mips64-dsp.d
+++ binutils-gdb/gas/testsuite/gas/mips/mips64-dsp.d
@@ -15,7 +15,7 @@
 0+0014 <[^>]*> 7c851b94 	addq_s\.qh	v1,a0,a1
 0+0018 <[^>]*> 7d4b4814 	addu\.ob	t1,t2,t3
 0+001c <[^>]*> 7d6c5114 	addu_s\.ob	t2,t3,t4
-0+0020 <[^>]*> 041dfff7 	bposge64	00000000 <text_label>
+0+0020 <[^>]*> 041dfff7 	bposge64	0+000000 <text_label>
 0+0024 <[^>]*> 00000000 	nop
 0+0028 <[^>]*> 7e950415 	cmp\.eq\.pw	s4,s5
 0+002c <[^>]*> 7eb60455 	cmp\.lt\.pw	s5,s6
Index: binutils-gdb/gas/testsuite/gas/mips/pcrel-1.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/pcrel-1.d
+++ binutils-gdb/gas/testsuite/gas/mips/pcrel-1.d
@@ -5,10 +5,10 @@
 
 Disassembly of section .text:
 
-00000000 <func>:
+0+000000 <func>:
        0:	3c040001 	lui	a0,0x1
        4:	2484800c 	addiu	a0,a0,-32756
 	...
 
-00008010 <foo>:
+0+008010 <foo>:
 #pass
Index: binutils-gdb/gas/testsuite/gas/mips/set-arch.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/set-arch.d
+++ binutils-gdb/gas/testsuite/gas/mips/set-arch.d
@@ -5,363 +5,363 @@
 .*:     file format .*
 
 Disassembly of section \.text:
-00000000 <[^>]*> bc010000 	cache	0x1,0\(zero\)
-00000004 <[^>]*> bc020000 	cache	0x2,0\(zero\)
-00000008 <[^>]*> bc030000 	cache	0x3,0\(zero\)
-0000000c <[^>]*> 0085001c 	dmult	a0,a1
-00000010 <[^>]*> 00a6001d 	dmultu	a1,a2
-00000014 <[^>]*> 00e0300b 	movn	a2,a3,zero
-00000018 <[^>]*> 0100380a 	movz	a3,t0,zero
-0000001c <[^>]*> 0109001e 	ddiv	zero,t0,t1
-00000020 <[^>]*> 012a001f 	ddivu	zero,t1,t2
-00000024 <[^>]*> 016c5005 	.word	0x16c5005
-00000028 <[^>]*> 018d5801 	movt	t3,t4,\$fcc3
-0000002c <[^>]*> 42000020 	wait
-00000030 <[^>]*> bdc40010 	cache	0x4,16\(t6\)
-00000034 <[^>]*> 71ee0010 	.word	0x71ee0010
-00000038 <[^>]*> 42000023 	c0	0x23
-0000003c <[^>]*> 42000021 	c0	0x21
-00000040 <[^>]*> 42000022 	c0	0x22
-00000044 <[^>]*> 70850000 	madd	a0,a1
-00000048 <[^>]*> 70a60001 	maddu	a1,a2
-0000004c <[^>]*> 70e83002 	mul	a2,a3,t0
-00000050 <[^>]*> 4500ffff 	bc1f	00000050 <[^>]*>
-00000054 <[^>]*> 4504fffe 	bc1f	\$fcc1,00000050 <[^>]*>
-00000058 <[^>]*> 4506fffd 	bc1fl	\$fcc1,00000050 <[^>]*>
-0000005c <[^>]*> 4505fffc 	bc1t	\$fcc1,00000050 <[^>]*>
-00000060 <[^>]*> 450bfffb 	bc1tl	\$fcc2,00000050 <[^>]*>
-00000064 <[^>]*> 46262030 	c\.f\.d	\$f4,\$f6
-00000068 <[^>]*> 46262130 	c\.f\.d	\$fcc1,\$f4,\$f6
-0000006c <[^>]*> 4ca40081 	ldxc1	\$f2,a0\(a1\)
-00000070 <[^>]*> 4ca40080 	lwxc1	\$f2,a0\(a1\)
-00000074 <[^>]*> 4c462021 	madd\.d	\$f0,\$f2,\$f4,\$f6
-00000078 <[^>]*> 4c462020 	madd\.s	\$f0,\$f2,\$f4,\$f6
-0000007c <[^>]*> 00b02001 	movf	a0,a1,\$fcc4
-00000080 <[^>]*> 46203111 	movf\.d	\$f4,\$f6,\$fcc0
-00000084 <[^>]*> 46003111 	movf\.s	\$f4,\$f6,\$fcc0
-00000088 <[^>]*> 00c6200b 	movn	a0,a2,a2
-0000008c <[^>]*> 46263113 	movn\.d	\$f4,\$f6,a2
-00000090 <[^>]*> 46063113 	movn\.s	\$f4,\$f6,a2
-00000094 <[^>]*> 00b12001 	movt	a0,a1,\$fcc4
-00000098 <[^>]*> 46213111 	movt\.d	\$f4,\$f6,\$fcc0
-0000009c <[^>]*> 46013111 	movt\.s	\$f4,\$f6,\$fcc0
-000000a0 <[^>]*> 00c6200a 	movz	a0,a2,a2
-000000a4 <[^>]*> 46263112 	movz\.d	\$f4,\$f6,a2
-000000a8 <[^>]*> 46063112 	movz\.s	\$f4,\$f6,a2
-000000ac <[^>]*> 4c462029 	msub\.d	\$f0,\$f2,\$f4,\$f6
-000000b0 <[^>]*> 4c462028 	msub\.s	\$f0,\$f2,\$f4,\$f6
-000000b4 <[^>]*> 4c462031 	nmadd\.d	\$f0,\$f2,\$f4,\$f6
-000000b8 <[^>]*> 4c462030 	nmadd\.s	\$f0,\$f2,\$f4,\$f6
-000000bc <[^>]*> 4c462039 	nmsub\.d	\$f0,\$f2,\$f4,\$f6
-000000c0 <[^>]*> 4c462038 	nmsub\.s	\$f0,\$f2,\$f4,\$f6
-000000c4 <[^>]*> 4ca4200f 	prefx	0x4,a0\(a1\)
-000000c8 <[^>]*> 46203115 	recip\.d	\$f4,\$f6
-000000cc <[^>]*> 46003115 	recip\.s	\$f4,\$f6
-000000d0 <[^>]*> 46203116 	rsqrt\.d	\$f4,\$f6
-000000d4 <[^>]*> 46003116 	rsqrt\.s	\$f4,\$f6
-000000d8 <[^>]*> 4ca42009 	sdxc1	\$f4,a0\(a1\)
-000000dc <[^>]*> 4ca42008 	swxc1	\$f4,a0\(a1\)
-000000e0 <[^>]*> 46c01005 	abs\.ps	\$f0,\$f2
-000000e4 <[^>]*> 46c62080 	add\.ps	\$f2,\$f4,\$f6
-000000e8 <[^>]*> 4c6a419e 	alnv\.ps	\$f6,\$f8,\$f10,v1
-000000ec <[^>]*> 46ca4032 	c\.eq\.ps	\$f8,\$f10
-000000f0 <[^>]*> 46cc5232 	c\.eq\.ps	\$fcc2,\$f10,\$f12
-000000f4 <[^>]*> 46ca4030 	c\.f\.ps	\$f8,\$f10
-000000f8 <[^>]*> 46cc5230 	c\.f\.ps	\$fcc2,\$f10,\$f12
-000000fc <[^>]*> 46ca403e 	c\.le\.ps	\$f8,\$f10
-00000100 <[^>]*> 46cc523e 	c\.le\.ps	\$fcc2,\$f10,\$f12
-00000104 <[^>]*> 46ca403c 	c\.lt\.ps	\$f8,\$f10
-00000108 <[^>]*> 46cc523c 	c\.lt\.ps	\$fcc2,\$f10,\$f12
-0000010c <[^>]*> 46ca403d 	c\.nge\.ps	\$f8,\$f10
-00000110 <[^>]*> 46cc523d 	c\.nge\.ps	\$fcc2,\$f10,\$f12
-00000114 <[^>]*> 46ca403b 	c\.ngl\.ps	\$f8,\$f10
-00000118 <[^>]*> 46cc523b 	c\.ngl\.ps	\$fcc2,\$f10,\$f12
-0000011c <[^>]*> 46ca4039 	c\.ngle\.ps	\$f8,\$f10
-00000120 <[^>]*> 46cc5239 	c\.ngle\.ps	\$fcc2,\$f10,\$f12
-00000124 <[^>]*> 46ca403f 	c\.ngt\.ps	\$f8,\$f10
-00000128 <[^>]*> 46cc523f 	c\.ngt\.ps	\$fcc2,\$f10,\$f12
-0000012c <[^>]*> 46ca4036 	c\.ole\.ps	\$f8,\$f10
-00000130 <[^>]*> 46cc5236 	c\.ole\.ps	\$fcc2,\$f10,\$f12
-00000134 <[^>]*> 46ca4034 	c\.olt\.ps	\$f8,\$f10
-00000138 <[^>]*> 46cc5234 	c\.olt\.ps	\$fcc2,\$f10,\$f12
-0000013c <[^>]*> 46ca403a 	c\.seq\.ps	\$f8,\$f10
-00000140 <[^>]*> 46cc523a 	c\.seq\.ps	\$fcc2,\$f10,\$f12
-00000144 <[^>]*> 46ca4038 	c\.sf\.ps	\$f8,\$f10
-00000148 <[^>]*> 46cc5238 	c\.sf\.ps	\$fcc2,\$f10,\$f12
-0000014c <[^>]*> 46ca4033 	c\.ueq\.ps	\$f8,\$f10
-00000150 <[^>]*> 46cc5233 	c\.ueq\.ps	\$fcc2,\$f10,\$f12
-00000154 <[^>]*> 46ca4037 	c\.ule\.ps	\$f8,\$f10
-00000158 <[^>]*> 46cc5237 	c\.ule\.ps	\$fcc2,\$f10,\$f12
-0000015c <[^>]*> 46ca4035 	c\.ult\.ps	\$f8,\$f10
-00000160 <[^>]*> 46cc5235 	c\.ult\.ps	\$fcc2,\$f10,\$f12
-00000164 <[^>]*> 46ca4031 	c\.un\.ps	\$f8,\$f10
-00000168 <[^>]*> 46cc5231 	c\.un\.ps	\$fcc2,\$f10,\$f12
-0000016c <[^>]*> 46107326 	cvt\.ps\.s	\$f12,\$f14,\$f16
-00000170 <[^>]*> 46c09428 	cvt\.s\.pl	\$f16,\$f18
-00000174 <[^>]*> 46c0a4a0 	cvt\.s\.pu	\$f18,\$f20
-00000178 <[^>]*> 4ca40505 	luxc1	\$f20,a0\(a1\)
-0000017c <[^>]*> 4edac526 	madd\.ps	\$f20,\$f22,\$f24,\$f26
-00000180 <[^>]*> 46c0d606 	mov\.ps	\$f24,\$f26
-00000184 <[^>]*> 46c8e691 	movf\.ps	\$f26,\$f28,\$fcc2
-00000188 <[^>]*> 46c3e693 	movn\.ps	\$f26,\$f28,v1
-0000018c <[^>]*> 46d1f711 	movt\.ps	\$f28,\$f30,\$fcc4
-00000190 <[^>]*> 46c5f712 	movz\.ps	\$f28,\$f30,a1
-00000194 <[^>]*> 4c0417ae 	msub\.ps	\$f30,\$f0,\$f2,\$f4
-00000198 <[^>]*> 46c62082 	mul\.ps	\$f2,\$f4,\$f6
-0000019c <[^>]*> 46c04187 	neg\.ps	\$f6,\$f8
-000001a0 <[^>]*> 4d0c51b6 	nmadd\.ps	\$f6,\$f8,\$f10,\$f12
-000001a4 <[^>]*> 4d0c51be 	nmsub\.ps	\$f6,\$f8,\$f10,\$f12
-000001a8 <[^>]*> 46ce62ac 	pll\.ps	\$f10,\$f12,\$f14
-000001ac <[^>]*> 46d283ad 	plu\.ps	\$f14,\$f16,\$f18
-000001b0 <[^>]*> 46d4942e 	pul\.ps	\$f16,\$f18,\$f20
-000001b4 <[^>]*> 46d8b52f 	puu\.ps	\$f20,\$f22,\$f24
-000001b8 <[^>]*> 46dac581 	sub\.ps	\$f22,\$f24,\$f26
-000001bc <[^>]*> 4ce6d00d 	suxc1	\$f26,a2\(a3\)
-000001c0 <[^>]*> 46cc5332 	c\.eq\.ps	\$fcc3,\$f10,\$f12
-000001c4 <[^>]*> 46cce691 	movf\.ps	\$f26,\$f28,\$fcc3
-000001c8 <[^>]*> 70410821 	clo	at,v0
-000001cc <[^>]*> 70831820 	clz	v1,a0
-000001d0 <[^>]*> 70a60000 	madd	a1,a2
-000001d4 <[^>]*> 70e80001 	maddu	a3,t0
-000001d8 <[^>]*> 712a0004 	msub	t1,t2
-000001dc <[^>]*> 716c0005 	msubu	t3,t4
-000001e0 <[^>]*> 71cf6802 	mul	t5,t6,t7
-000001e4 <[^>]*> ce040000 	pref	0x4,0\(s0\)
-000001e8 <[^>]*> ce247fff 	pref	0x4,32767\(s1\)
-000001ec <[^>]*> ce448000 	pref	0x4,-32768\(s2\)
-000001f0 <[^>]*> 00000040 	ssnop
-000001f4 <[^>]*> 4900ff96 	bc2f	00000050 <[^>]*>
-000001f8 <[^>]*> 00000000 	nop
-000001fc <[^>]*> 4902ff94 	bc2fl	00000050 <[^>]*>
-00000200 <[^>]*> 00000000 	nop
-00000204 <[^>]*> 4901ff92 	bc2t	00000050 <[^>]*>
-00000208 <[^>]*> 00000000 	nop
-0000020c <[^>]*> 4903ff90 	bc2tl	00000050 <[^>]*>
-00000210 <[^>]*> 00000000 	nop
-00000214 <[^>]*> 48411000 	cfc2	at,\$2
-00000218 <[^>]*> 4b234567 	c2	0x1234567
-0000021c <[^>]*> 48c21800 	ctc2	v0,\$3
-00000220 <[^>]*> 48032000 	mfc2	v1,\$4
-00000224 <[^>]*> 48042800 	mfc2	a0,\$5
-00000228 <[^>]*> 48053007 	mfc2	a1,\$6,7
-0000022c <[^>]*> 48863800 	mtc2	a2,\$7
-00000230 <[^>]*> 48874000 	mtc2	a3,\$8
-00000234 <[^>]*> 48884807 	mtc2	t0,\$9,7
-00000238 <[^>]*> bc250000 	cache	0x5,0\(at\)
-0000023c <[^>]*> bc457fff 	cache	0x5,32767\(v0\)
-00000240 <[^>]*> bc658000 	cache	0x5,-32768\(v1\)
-00000244 <[^>]*> 42000018 	eret
-00000248 <[^>]*> 42000008 	tlbp
-0000024c <[^>]*> 42000001 	tlbr
-00000250 <[^>]*> 42000002 	tlbwi
-00000254 <[^>]*> 42000006 	tlbwr
-00000258 <[^>]*> 42000020 	wait
-0000025c <[^>]*> 42000020 	wait
-00000260 <[^>]*> 4359e260 	wait	0x56789
-00000264 <[^>]*> 0000000d 	break
-00000268 <[^>]*> 0000000d 	break
-0000026c <[^>]*> 0345000d 	break	0x345
-00000270 <[^>]*> 0048d14d 	break	0x48,0x345
-00000274 <[^>]*> 7000003f 	sdbbp
-00000278 <[^>]*> 7000003f 	sdbbp
-0000027c <[^>]*> 7159e27f 	sdbbp	0x56789
-00000280 <[^>]*> 000000c0 	ehb
-00000284 <[^>]*> 7ca43980 	.word	0x7ca43980
-00000288 <[^>]*> 7ca46984 	.word	0x7ca46984
-0000028c <[^>]*> 0100fc09 	jalr.hb	t0
-00000290 <[^>]*> 0120a409 	jalr.hb	s4,t1
-00000294 <[^>]*> 01000408 	jr.hb	t0
-00000298 <[^>]*> 7c0a003b 	.word	0x7c0a003b
-0000029c <[^>]*> 7c0b083b 	.word	0x7c0b083b
-000002a0 <[^>]*> 7c0c103b 	.word	0x7c0c103b
-000002a4 <[^>]*> 7c0d183b 	.word	0x7c0d183b
-000002a8 <[^>]*> 7c0e203b 	.word	0x7c0e203b
-000002ac <[^>]*> 7c0f283b 	.word	0x7c0f283b
-000002b0 <[^>]*> 002acf02 	.word	0x2acf02
-000002b4 <[^>]*> 002ac902 	.word	0x2ac902
-000002b8 <[^>]*> 0004c823 	negu	t9,a0
-000002bc <[^>]*> 032ac846 	.word	0x32ac846
-000002c0 <[^>]*> 008ac846 	.word	0x8ac846
-000002c4 <[^>]*> 008ac846 	.word	0x8ac846
-000002c8 <[^>]*> 7c073c20 	.word	0x7c073c20
-000002cc <[^>]*> 7c0a4420 	.word	0x7c0a4420
-000002d0 <[^>]*> 7c073e20 	.word	0x7c073e20
-000002d4 <[^>]*> 7c0a4620 	.word	0x7c0a4620
-000002d8 <[^>]*> 055f5555 	.word	0x55f5555
-000002dc <[^>]*> 7c0738a0 	.word	0x7c0738a0
-000002e0 <[^>]*> 7c0a40a0 	.word	0x7c0a40a0
-000002e4 <[^>]*> 41606000 	.word	0x41606000
-000002e8 <[^>]*> 41606000 	.word	0x41606000
-000002ec <[^>]*> 416a6000 	.word	0x416a6000
-000002f0 <[^>]*> 41606020 	.word	0x41606020
-000002f4 <[^>]*> 41606020 	.word	0x41606020
-000002f8 <[^>]*> 416a6020 	.word	0x416a6020
-000002fc <[^>]*> 41595000 	.word	0x41595000
-00000300 <[^>]*> 41d95000 	.word	0x41d95000
-00000304 <[^>]*> 44710000 	.word	0x44710000
-00000308 <[^>]*> 44f10000 	.word	0x44f10000
-0000030c <[^>]*> 48715555 	.word	0x48715555
-00000310 <[^>]*> 48f15555 	.word	0x48f15555
-00000314 <[^>]*> 70410825 	dclo	at,v0
-00000318 <[^>]*> 70831824 	dclz	v1,a0
-0000031c <[^>]*> 48232000 	dmfc2	v1,\$4
-00000320 <[^>]*> 48242800 	dmfc2	a0,\$5
-00000324 <[^>]*> 48253007 	dmfc2	a1,\$6,7
-00000328 <[^>]*> 48a63800 	dmtc2	a2,\$7
-0000032c <[^>]*> 48a74000 	dmtc2	a3,\$8
-00000330 <[^>]*> 48a84807 	dmtc2	t0,\$9,7
-00000334 <[^>]*> 00850029 	.word	0x850029
-00000338 <[^>]*> 00a60028 	.word	0xa60028
-0000033c <[^>]*> 00002012 	mflo	a0
-00000340 <[^>]*> 00a62029 	.word	0xa62029
-00000344 <[^>]*> 00a62229 	.word	0xa62229
-00000348 <[^>]*> 00a62629 	.word	0xa62629
-0000034c <[^>]*> 00a62269 	.word	0xa62269
-00000350 <[^>]*> 00a62669 	.word	0xa62669
-00000354 <[^>]*> 00a62429 	.word	0xa62429
-00000358 <[^>]*> 00a62069 	.word	0xa62069
-0000035c <[^>]*> 00a62469 	.word	0xa62469
-00000360 <[^>]*> 00002012 	mflo	a0
-00000364 <[^>]*> 00a62028 	.word	0xa62028
-00000368 <[^>]*> 00a62228 	.word	0xa62228
-0000036c <[^>]*> 00a62628 	.word	0xa62628
-00000370 <[^>]*> 00a62268 	.word	0xa62268
-00000374 <[^>]*> 00a62668 	.word	0xa62668
-00000378 <[^>]*> 00a62428 	.word	0xa62428
-0000037c <[^>]*> 00a62068 	.word	0xa62068
-00000380 <[^>]*> 00a62468 	.word	0xa62468
-00000384 <[^>]*> 00a62059 	.word	0xa62059
-00000388 <[^>]*> 00a62258 	.word	0xa62258
-0000038c <[^>]*> 00a62259 	.word	0xa62259
-00000390 <[^>]*> 00a620d8 	.word	0xa620d8
-00000394 <[^>]*> 00a620d9 	.word	0xa620d9
-00000398 <[^>]*> 00a622d8 	.word	0xa622d8
-0000039c <[^>]*> 00a622d9 	.word	0xa622d9
-000003a0 <[^>]*> 00a62158 	.word	0xa62158
-000003a4 <[^>]*> 00a62159 	.word	0xa62159
-000003a8 <[^>]*> 00a62358 	.word	0xa62358
-000003ac <[^>]*> 00a62359 	.word	0xa62359
-000003b0 <[^>]*> 00a621d8 	.word	0xa621d8
-000003b4 <[^>]*> 00a621d9 	.word	0xa621d9
-000003b8 <[^>]*> 00a623d8 	.word	0xa623d8
-000003bc <[^>]*> 00a623d9 	.word	0xa623d9
-000003c0 <[^>]*> 00252642 	.word	0x252642
-000003c4 <[^>]*> 00c52046 	.word	0xc52046
-000003c8 <[^>]*> 0025267a 	.word	0x25267a
-000003cc <[^>]*> 0025267e 	.word	0x25267e
-000003d0 <[^>]*> 0025267e 	.word	0x25267e
-000003d4 <[^>]*> 00c52056 	.word	0xc52056
-000003d8 <[^>]*> 7000003f 	sdbbp
-000003dc <[^>]*> 7000003e 	.word	0x7000003e
-000003e0 <[^>]*> 7003183d 	.word	0x7003183d
-000003e4 <[^>]*> 7083183d 	.word	0x7083183d
-000003e8 <[^>]*> 4004c803 	mfc0	a0,c0_perfcnt,3
-000003ec <[^>]*> 4004c802 	mfc0	a0,c0_perfcnt,2
-000003f0 <[^>]*> 4084c803 	mtc0	a0,c0_perfcnt,3
-000003f4 <[^>]*> 4084c802 	mtc0	a0,c0_perfcnt,2
-000003f8 <[^>]*> 4ac4100b 	c2	0xc4100b
-000003fc <[^>]*> 4886208b 	.word	0x4886208b
-00000400 <[^>]*> 4bcf218b 	c2	0x1cf218b
-00000404 <[^>]*> 4bdf310b 	c2	0x1df310b
-00000408 <[^>]*> 4ac4100c 	c2	0xc4100c
-0000040c <[^>]*> 4886208c 	.word	0x4886208c
-00000410 <[^>]*> 4bcf218c 	c2	0x1cf218c
-00000414 <[^>]*> 4bdf310c 	c2	0x1df310c
-00000418 <[^>]*> 4ac20001 	c2	0xc20001
-0000041c <[^>]*> 48862001 	mtc2	a2,\$4,1
-00000420 <[^>]*> 4bcf3001 	c2	0x1cf3001
-00000424 <[^>]*> 4bdf2001 	c2	0x1df2001
-00000428 <[^>]*> 4ac20005 	c2	0xc20005
-0000042c <[^>]*> 48862005 	mtc2	a2,\$4,5
-00000430 <[^>]*> 4bcf3005 	c2	0x1cf3005
-00000434 <[^>]*> 4bdf2005 	c2	0x1df2005
-00000438 <[^>]*> 4ac20004 	c2	0xc20004
-0000043c <[^>]*> 48862004 	mtc2	a2,\$4,4
-00000440 <[^>]*> 4bcf3004 	c2	0x1cf3004
-00000444 <[^>]*> 4bdf2004 	c2	0x1df2004
-00000448 <[^>]*> 4ac41007 	c2	0xc41007
-0000044c <[^>]*> 48862087 	.word	0x48862087
-00000450 <[^>]*> 4bcf2187 	c2	0x1cf2187
-00000454 <[^>]*> 4bdf3107 	c2	0x1df3107
-00000458 <[^>]*> 4ac41006 	c2	0xc41006
-0000045c <[^>]*> 48862086 	.word	0x48862086
-00000460 <[^>]*> 4bcf2186 	c2	0x1cf2186
-00000464 <[^>]*> 4bdf3106 	c2	0x1df3106
-00000468 <[^>]*> 4ac41030 	c2	0xc41030
-0000046c <[^>]*> 488620b0 	.word	0x488620b0
-00000470 <[^>]*> 4bcf21b0 	c2	0x1cf21b0
-00000474 <[^>]*> 4bdf3130 	c2	0x1df3130
-00000478 <[^>]*> 4ac20033 	c2	0xc20033
-0000047c <[^>]*> 48862033 	.word	0x48862033
-00000480 <[^>]*> 4bcf3033 	c2	0x1cf3033
-00000484 <[^>]*> 4bdf2033 	c2	0x1df2033
-00000488 <[^>]*> 4ac20433 	c2	0xc20433
-0000048c <[^>]*> 48862433 	.word	0x48862433
-00000490 <[^>]*> 4bcf3433 	c2	0x1cf3433
-00000494 <[^>]*> 4bdf2433 	c2	0x1df2433
-00000498 <[^>]*> 4ac20032 	c2	0xc20032
-0000049c <[^>]*> 48862032 	.word	0x48862032
-000004a0 <[^>]*> 4bcf3032 	c2	0x1cf3032
-000004a4 <[^>]*> 4bdf2032 	c2	0x1df2032
-000004a8 <[^>]*> 4ac20432 	c2	0xc20432
-000004ac <[^>]*> 48862432 	.word	0x48862432
-000004b0 <[^>]*> 4bcf3432 	c2	0x1cf3432
-000004b4 <[^>]*> 4bdf2432 	c2	0x1df2432
-000004b8 <[^>]*> 4ac4100f 	c2	0xc4100f
-000004bc <[^>]*> 4886208f 	.word	0x4886208f
-000004c0 <[^>]*> 4bcf218f 	c2	0x1cf218f
-000004c4 <[^>]*> 4bdf310f 	c2	0x1df310f
-000004c8 <[^>]*> 4ac4100e 	c2	0xc4100e
-000004cc <[^>]*> 4886208e 	.word	0x4886208e
-000004d0 <[^>]*> 4bcf218e 	c2	0x1cf218e
-000004d4 <[^>]*> 4bdf310e 	c2	0x1df310e
-000004d8 <[^>]*> 4ac41002 	c2	0xc41002
-000004dc <[^>]*> 48862082 	.word	0x48862082
-000004e0 <[^>]*> 4bcf2182 	c2	0x1cf2182
-000004e4 <[^>]*> 4bdf3102 	c2	0x1df3102
-000004e8 <[^>]*> 4ac41003 	c2	0xc41003
-000004ec <[^>]*> 48862083 	.word	0x48862083
-000004f0 <[^>]*> 4bcf2183 	c2	0x1cf2183
-000004f4 <[^>]*> 4bdf3103 	c2	0x1df3103
-000004f8 <[^>]*> 4ac4100a 	c2	0xc4100a
-000004fc <[^>]*> 4886208a 	.word	0x4886208a
-00000500 <[^>]*> 4bcf218a 	c2	0x1cf218a
-00000504 <[^>]*> 4bdf310a 	c2	0x1df310a
-00000508 <[^>]*> 4ac4100d 	c2	0xc4100d
-0000050c <[^>]*> 4886208d 	.word	0x4886208d
-00000510 <[^>]*> 4bcf218d 	c2	0x1cf218d
-00000514 <[^>]*> 4bdf310d 	c2	0x1df310d
-00000518 <[^>]*> 48a41018 	.word	0x48a41018
-0000051c <[^>]*> 4984101f 	.word	0x4984101f
-00000520 <[^>]*> 49c4101f 	.word	0x49c4101f
-00000524 <[^>]*> 4904101f 	bc2f	\$cc1,000045a4 <[^>]*>
-00000528 <[^>]*> 4944101f 	.word	0x4944101f
-0000052c <[^>]*> 48c62090 	.word	0x48c62090
-00000530 <[^>]*> 4bce3110 	c2	0x1ce3110
-00000534 <[^>]*> 48c62092 	.word	0x48c62092
-00000538 <[^>]*> 4bce3112 	c2	0x1ce3112
-0000053c <[^>]*> 4bcd00a0 	c2	0x1cd00a0
-00000540 <[^>]*> 4a0000bf 	c2	0xbf
-00000544 <[^>]*> 480000bf 	.word	0x480000bf
-00000548 <[^>]*> 490000bf 	bc2f	00000848 <[^>]*>
-0000054c <[^>]*> 4a00103e 	c2	0x103e
-00000550 <[^>]*> 4804103e 	.word	0x4804103e
-00000554 <[^>]*> 00c52046 	.word	0xc52046
-00000558 <[^>]*> 00252442 	.word	0x252442
-0000055c <[^>]*> 00c52056 	.word	0xc52056
-00000560 <[^>]*> 0025207e 	.word	0x25207e
-00000564 <[^>]*> 002520ba 	.word	0x2520ba
-00000568 <[^>]*> 4ca4200f 	prefx	0x4,a0\(a1\)
-0000056c <[^>]*> 42000020 	wait
-00000570 <[^>]*> 42000020 	wait
-00000574 <[^>]*> 4359e260 	wait	0x56789
-00000578 <[^>]*> 00000040 	ssnop
-0000057c <[^>]*> 70831821 	clo	v1,a0
-00000580 <[^>]*> 70831825 	dclo	v1,a0
-00000584 <[^>]*> 70831820 	clz	v1,a0
-00000588 <[^>]*> 70831824 	dclz	v1,a0
-0000058c <[^>]*> 4c440005 	luxc1	\$f0,a0\(v0\)
-00000590 <[^>]*> 4c44100d 	suxc1	\$f2,a0\(v0\)
-00000594 <[^>]*> 42000008 	tlbp
-00000598 <[^>]*> 42000001 	tlbr
+0+000000 <[^>]*> bc010000 	cache	0x1,0\(zero\)
+0+000004 <[^>]*> bc020000 	cache	0x2,0\(zero\)
+0+000008 <[^>]*> bc030000 	cache	0x3,0\(zero\)
+0+00000c <[^>]*> 0085001c 	dmult	a0,a1
+0+000010 <[^>]*> 00a6001d 	dmultu	a1,a2
+0+000014 <[^>]*> 00e0300b 	movn	a2,a3,zero
+0+000018 <[^>]*> 0100380a 	movz	a3,t0,zero
+0+00001c <[^>]*> 0109001e 	ddiv	zero,t0,t1
+0+000020 <[^>]*> 012a001f 	ddivu	zero,t1,t2
+0+000024 <[^>]*> 016c5005 	.word	0x16c5005
+0+000028 <[^>]*> 018d5801 	movt	t3,t4,\$fcc3
+0+00002c <[^>]*> 42000020 	wait
+0+000030 <[^>]*> bdc40010 	cache	0x4,16\(t6\)
+0+000034 <[^>]*> 71ee0010 	.word	0x71ee0010
+0+000038 <[^>]*> 42000023 	c0	0x23
+0+00003c <[^>]*> 42000021 	c0	0x21
+0+000040 <[^>]*> 42000022 	c0	0x22
+0+000044 <[^>]*> 70850000 	madd	a0,a1
+0+000048 <[^>]*> 70a60001 	maddu	a1,a2
+0+00004c <[^>]*> 70e83002 	mul	a2,a3,t0
+0+000050 <[^>]*> 4500ffff 	bc1f	0+000050 <[^>]*>
+0+000054 <[^>]*> 4504fffe 	bc1f	\$fcc1,0+000050 <[^>]*>
+0+000058 <[^>]*> 4506fffd 	bc1fl	\$fcc1,0+000050 <[^>]*>
+0+00005c <[^>]*> 4505fffc 	bc1t	\$fcc1,0+000050 <[^>]*>
+0+000060 <[^>]*> 450bfffb 	bc1tl	\$fcc2,0+000050 <[^>]*>
+0+000064 <[^>]*> 46262030 	c\.f\.d	\$f4,\$f6
+0+000068 <[^>]*> 46262130 	c\.f\.d	\$fcc1,\$f4,\$f6
+0+00006c <[^>]*> 4ca40081 	ldxc1	\$f2,a0\(a1\)
+0+000070 <[^>]*> 4ca40080 	lwxc1	\$f2,a0\(a1\)
+0+000074 <[^>]*> 4c462021 	madd\.d	\$f0,\$f2,\$f4,\$f6
+0+000078 <[^>]*> 4c462020 	madd\.s	\$f0,\$f2,\$f4,\$f6
+0+00007c <[^>]*> 00b02001 	movf	a0,a1,\$fcc4
+0+000080 <[^>]*> 46203111 	movf\.d	\$f4,\$f6,\$fcc0
+0+000084 <[^>]*> 46003111 	movf\.s	\$f4,\$f6,\$fcc0
+0+000088 <[^>]*> 00c6200b 	movn	a0,a2,a2
+0+00008c <[^>]*> 46263113 	movn\.d	\$f4,\$f6,a2
+0+000090 <[^>]*> 46063113 	movn\.s	\$f4,\$f6,a2
+0+000094 <[^>]*> 00b12001 	movt	a0,a1,\$fcc4
+0+000098 <[^>]*> 46213111 	movt\.d	\$f4,\$f6,\$fcc0
+0+00009c <[^>]*> 46013111 	movt\.s	\$f4,\$f6,\$fcc0
+0+0000a0 <[^>]*> 00c6200a 	movz	a0,a2,a2
+0+0000a4 <[^>]*> 46263112 	movz\.d	\$f4,\$f6,a2
+0+0000a8 <[^>]*> 46063112 	movz\.s	\$f4,\$f6,a2
+0+0000ac <[^>]*> 4c462029 	msub\.d	\$f0,\$f2,\$f4,\$f6
+0+0000b0 <[^>]*> 4c462028 	msub\.s	\$f0,\$f2,\$f4,\$f6
+0+0000b4 <[^>]*> 4c462031 	nmadd\.d	\$f0,\$f2,\$f4,\$f6
+0+0000b8 <[^>]*> 4c462030 	nmadd\.s	\$f0,\$f2,\$f4,\$f6
+0+0000bc <[^>]*> 4c462039 	nmsub\.d	\$f0,\$f2,\$f4,\$f6
+0+0000c0 <[^>]*> 4c462038 	nmsub\.s	\$f0,\$f2,\$f4,\$f6
+0+0000c4 <[^>]*> 4ca4200f 	prefx	0x4,a0\(a1\)
+0+0000c8 <[^>]*> 46203115 	recip\.d	\$f4,\$f6
+0+0000cc <[^>]*> 46003115 	recip\.s	\$f4,\$f6
+0+0000d0 <[^>]*> 46203116 	rsqrt\.d	\$f4,\$f6
+0+0000d4 <[^>]*> 46003116 	rsqrt\.s	\$f4,\$f6
+0+0000d8 <[^>]*> 4ca42009 	sdxc1	\$f4,a0\(a1\)
+0+0000dc <[^>]*> 4ca42008 	swxc1	\$f4,a0\(a1\)
+0+0000e0 <[^>]*> 46c01005 	abs\.ps	\$f0,\$f2
+0+0000e4 <[^>]*> 46c62080 	add\.ps	\$f2,\$f4,\$f6
+0+0000e8 <[^>]*> 4c6a419e 	alnv\.ps	\$f6,\$f8,\$f10,v1
+0+0000ec <[^>]*> 46ca4032 	c\.eq\.ps	\$f8,\$f10
+0+0000f0 <[^>]*> 46cc5232 	c\.eq\.ps	\$fcc2,\$f10,\$f12
+0+0000f4 <[^>]*> 46ca4030 	c\.f\.ps	\$f8,\$f10
+0+0000f8 <[^>]*> 46cc5230 	c\.f\.ps	\$fcc2,\$f10,\$f12
+0+0000fc <[^>]*> 46ca403e 	c\.le\.ps	\$f8,\$f10
+0+000100 <[^>]*> 46cc523e 	c\.le\.ps	\$fcc2,\$f10,\$f12
+0+000104 <[^>]*> 46ca403c 	c\.lt\.ps	\$f8,\$f10
+0+000108 <[^>]*> 46cc523c 	c\.lt\.ps	\$fcc2,\$f10,\$f12
+0+00010c <[^>]*> 46ca403d 	c\.nge\.ps	\$f8,\$f10
+0+000110 <[^>]*> 46cc523d 	c\.nge\.ps	\$fcc2,\$f10,\$f12
+0+000114 <[^>]*> 46ca403b 	c\.ngl\.ps	\$f8,\$f10
+0+000118 <[^>]*> 46cc523b 	c\.ngl\.ps	\$fcc2,\$f10,\$f12
+0+00011c <[^>]*> 46ca4039 	c\.ngle\.ps	\$f8,\$f10
+0+000120 <[^>]*> 46cc5239 	c\.ngle\.ps	\$fcc2,\$f10,\$f12
+0+000124 <[^>]*> 46ca403f 	c\.ngt\.ps	\$f8,\$f10
+0+000128 <[^>]*> 46cc523f 	c\.ngt\.ps	\$fcc2,\$f10,\$f12
+0+00012c <[^>]*> 46ca4036 	c\.ole\.ps	\$f8,\$f10
+0+000130 <[^>]*> 46cc5236 	c\.ole\.ps	\$fcc2,\$f10,\$f12
+0+000134 <[^>]*> 46ca4034 	c\.olt\.ps	\$f8,\$f10
+0+000138 <[^>]*> 46cc5234 	c\.olt\.ps	\$fcc2,\$f10,\$f12
+0+00013c <[^>]*> 46ca403a 	c\.seq\.ps	\$f8,\$f10
+0+000140 <[^>]*> 46cc523a 	c\.seq\.ps	\$fcc2,\$f10,\$f12
+0+000144 <[^>]*> 46ca4038 	c\.sf\.ps	\$f8,\$f10
+0+000148 <[^>]*> 46cc5238 	c\.sf\.ps	\$fcc2,\$f10,\$f12
+0+00014c <[^>]*> 46ca4033 	c\.ueq\.ps	\$f8,\$f10
+0+000150 <[^>]*> 46cc5233 	c\.ueq\.ps	\$fcc2,\$f10,\$f12
+0+000154 <[^>]*> 46ca4037 	c\.ule\.ps	\$f8,\$f10
+0+000158 <[^>]*> 46cc5237 	c\.ule\.ps	\$fcc2,\$f10,\$f12
+0+00015c <[^>]*> 46ca4035 	c\.ult\.ps	\$f8,\$f10
+0+000160 <[^>]*> 46cc5235 	c\.ult\.ps	\$fcc2,\$f10,\$f12
+0+000164 <[^>]*> 46ca4031 	c\.un\.ps	\$f8,\$f10
+0+000168 <[^>]*> 46cc5231 	c\.un\.ps	\$fcc2,\$f10,\$f12
+0+00016c <[^>]*> 46107326 	cvt\.ps\.s	\$f12,\$f14,\$f16
+0+000170 <[^>]*> 46c09428 	cvt\.s\.pl	\$f16,\$f18
+0+000174 <[^>]*> 46c0a4a0 	cvt\.s\.pu	\$f18,\$f20
+0+000178 <[^>]*> 4ca40505 	luxc1	\$f20,a0\(a1\)
+0+00017c <[^>]*> 4edac526 	madd\.ps	\$f20,\$f22,\$f24,\$f26
+0+000180 <[^>]*> 46c0d606 	mov\.ps	\$f24,\$f26
+0+000184 <[^>]*> 46c8e691 	movf\.ps	\$f26,\$f28,\$fcc2
+0+000188 <[^>]*> 46c3e693 	movn\.ps	\$f26,\$f28,v1
+0+00018c <[^>]*> 46d1f711 	movt\.ps	\$f28,\$f30,\$fcc4
+0+000190 <[^>]*> 46c5f712 	movz\.ps	\$f28,\$f30,a1
+0+000194 <[^>]*> 4c0417ae 	msub\.ps	\$f30,\$f0,\$f2,\$f4
+0+000198 <[^>]*> 46c62082 	mul\.ps	\$f2,\$f4,\$f6
+0+00019c <[^>]*> 46c04187 	neg\.ps	\$f6,\$f8
+0+0001a0 <[^>]*> 4d0c51b6 	nmadd\.ps	\$f6,\$f8,\$f10,\$f12
+0+0001a4 <[^>]*> 4d0c51be 	nmsub\.ps	\$f6,\$f8,\$f10,\$f12
+0+0001a8 <[^>]*> 46ce62ac 	pll\.ps	\$f10,\$f12,\$f14
+0+0001ac <[^>]*> 46d283ad 	plu\.ps	\$f14,\$f16,\$f18
+0+0001b0 <[^>]*> 46d4942e 	pul\.ps	\$f16,\$f18,\$f20
+0+0001b4 <[^>]*> 46d8b52f 	puu\.ps	\$f20,\$f22,\$f24
+0+0001b8 <[^>]*> 46dac581 	sub\.ps	\$f22,\$f24,\$f26
+0+0001bc <[^>]*> 4ce6d00d 	suxc1	\$f26,a2\(a3\)
+0+0001c0 <[^>]*> 46cc5332 	c\.eq\.ps	\$fcc3,\$f10,\$f12
+0+0001c4 <[^>]*> 46cce691 	movf\.ps	\$f26,\$f28,\$fcc3
+0+0001c8 <[^>]*> 70410821 	clo	at,v0
+0+0001cc <[^>]*> 70831820 	clz	v1,a0
+0+0001d0 <[^>]*> 70a60000 	madd	a1,a2
+0+0001d4 <[^>]*> 70e80001 	maddu	a3,t0
+0+0001d8 <[^>]*> 712a0004 	msub	t1,t2
+0+0001dc <[^>]*> 716c0005 	msubu	t3,t4
+0+0001e0 <[^>]*> 71cf6802 	mul	t5,t6,t7
+0+0001e4 <[^>]*> ce040000 	pref	0x4,0\(s0\)
+0+0001e8 <[^>]*> ce247fff 	pref	0x4,32767\(s1\)
+0+0001ec <[^>]*> ce448000 	pref	0x4,-32768\(s2\)
+0+0001f0 <[^>]*> 00000040 	ssnop
+0+0001f4 <[^>]*> 4900ff96 	bc2f	0+000050 <[^>]*>
+0+0001f8 <[^>]*> 00000000 	nop
+0+0001fc <[^>]*> 4902ff94 	bc2fl	0+000050 <[^>]*>
+0+000200 <[^>]*> 00000000 	nop
+0+000204 <[^>]*> 4901ff92 	bc2t	0+000050 <[^>]*>
+0+000208 <[^>]*> 00000000 	nop
+0+00020c <[^>]*> 4903ff90 	bc2tl	0+000050 <[^>]*>
+0+000210 <[^>]*> 00000000 	nop
+0+000214 <[^>]*> 48411000 	cfc2	at,\$2
+0+000218 <[^>]*> 4b234567 	c2	0x1234567
+0+00021c <[^>]*> 48c21800 	ctc2	v0,\$3
+0+000220 <[^>]*> 48032000 	mfc2	v1,\$4
+0+000224 <[^>]*> 48042800 	mfc2	a0,\$5
+0+000228 <[^>]*> 48053007 	mfc2	a1,\$6,7
+0+00022c <[^>]*> 48863800 	mtc2	a2,\$7
+0+000230 <[^>]*> 48874000 	mtc2	a3,\$8
+0+000234 <[^>]*> 48884807 	mtc2	t0,\$9,7
+0+000238 <[^>]*> bc250000 	cache	0x5,0\(at\)
+0+00023c <[^>]*> bc457fff 	cache	0x5,32767\(v0\)
+0+000240 <[^>]*> bc658000 	cache	0x5,-32768\(v1\)
+0+000244 <[^>]*> 42000018 	eret
+0+000248 <[^>]*> 42000008 	tlbp
+0+00024c <[^>]*> 42000001 	tlbr
+0+000250 <[^>]*> 42000002 	tlbwi
+0+000254 <[^>]*> 42000006 	tlbwr
+0+000258 <[^>]*> 42000020 	wait
+0+00025c <[^>]*> 42000020 	wait
+0+000260 <[^>]*> 4359e260 	wait	0x56789
+0+000264 <[^>]*> 0000000d 	break
+0+000268 <[^>]*> 0000000d 	break
+0+00026c <[^>]*> 0345000d 	break	0x345
+0+000270 <[^>]*> 0048d14d 	break	0x48,0x345
+0+000274 <[^>]*> 7000003f 	sdbbp
+0+000278 <[^>]*> 7000003f 	sdbbp
+0+00027c <[^>]*> 7159e27f 	sdbbp	0x56789
+0+000280 <[^>]*> 000000c0 	ehb
+0+000284 <[^>]*> 7ca43980 	.word	0x7ca43980
+0+000288 <[^>]*> 7ca46984 	.word	0x7ca46984
+0+00028c <[^>]*> 0100fc09 	jalr.hb	t0
+0+000290 <[^>]*> 0120a409 	jalr.hb	s4,t1
+0+000294 <[^>]*> 01000408 	jr.hb	t0
+0+000298 <[^>]*> 7c0a003b 	.word	0x7c0a003b
+0+00029c <[^>]*> 7c0b083b 	.word	0x7c0b083b
+0+0002a0 <[^>]*> 7c0c103b 	.word	0x7c0c103b
+0+0002a4 <[^>]*> 7c0d183b 	.word	0x7c0d183b
+0+0002a8 <[^>]*> 7c0e203b 	.word	0x7c0e203b
+0+0002ac <[^>]*> 7c0f283b 	.word	0x7c0f283b
+0+0002b0 <[^>]*> 002acf02 	.word	0x2acf02
+0+0002b4 <[^>]*> 002ac902 	.word	0x2ac902
+0+0002b8 <[^>]*> 0004c823 	negu	t9,a0
+0+0002bc <[^>]*> 032ac846 	.word	0x32ac846
+0+0002c0 <[^>]*> 008ac846 	.word	0x8ac846
+0+0002c4 <[^>]*> 008ac846 	.word	0x8ac846
+0+0002c8 <[^>]*> 7c073c20 	.word	0x7c073c20
+0+0002cc <[^>]*> 7c0a4420 	.word	0x7c0a4420
+0+0002d0 <[^>]*> 7c073e20 	.word	0x7c073e20
+0+0002d4 <[^>]*> 7c0a4620 	.word	0x7c0a4620
+0+0002d8 <[^>]*> 055f5555 	.word	0x55f5555
+0+0002dc <[^>]*> 7c0738a0 	.word	0x7c0738a0
+0+0002e0 <[^>]*> 7c0a40a0 	.word	0x7c0a40a0
+0+0002e4 <[^>]*> 41606000 	.word	0x41606000
+0+0002e8 <[^>]*> 41606000 	.word	0x41606000
+0+0002ec <[^>]*> 416a6000 	.word	0x416a6000
+0+0002f0 <[^>]*> 41606020 	.word	0x41606020
+0+0002f4 <[^>]*> 41606020 	.word	0x41606020
+0+0002f8 <[^>]*> 416a6020 	.word	0x416a6020
+0+0002fc <[^>]*> 41595000 	.word	0x41595000
+0+000300 <[^>]*> 41d95000 	.word	0x41d95000
+0+000304 <[^>]*> 44710000 	.word	0x44710000
+0+000308 <[^>]*> 44f10000 	.word	0x44f10000
+0+00030c <[^>]*> 48715555 	.word	0x48715555
+0+000310 <[^>]*> 48f15555 	.word	0x48f15555
+0+000314 <[^>]*> 70410825 	dclo	at,v0
+0+000318 <[^>]*> 70831824 	dclz	v1,a0
+0+00031c <[^>]*> 48232000 	dmfc2	v1,\$4
+0+000320 <[^>]*> 48242800 	dmfc2	a0,\$5
+0+000324 <[^>]*> 48253007 	dmfc2	a1,\$6,7
+0+000328 <[^>]*> 48a63800 	dmtc2	a2,\$7
+0+00032c <[^>]*> 48a74000 	dmtc2	a3,\$8
+0+000330 <[^>]*> 48a84807 	dmtc2	t0,\$9,7
+0+000334 <[^>]*> 00850029 	.word	0x850029
+0+000338 <[^>]*> 00a60028 	.word	0xa60028
+0+00033c <[^>]*> 00002012 	mflo	a0
+0+000340 <[^>]*> 00a62029 	.word	0xa62029
+0+000344 <[^>]*> 00a62229 	.word	0xa62229
+0+000348 <[^>]*> 00a62629 	.word	0xa62629
+0+00034c <[^>]*> 00a62269 	.word	0xa62269
+0+000350 <[^>]*> 00a62669 	.word	0xa62669
+0+000354 <[^>]*> 00a62429 	.word	0xa62429
+0+000358 <[^>]*> 00a62069 	.word	0xa62069
+0+00035c <[^>]*> 00a62469 	.word	0xa62469
+0+000360 <[^>]*> 00002012 	mflo	a0
+0+000364 <[^>]*> 00a62028 	.word	0xa62028
+0+000368 <[^>]*> 00a62228 	.word	0xa62228
+0+00036c <[^>]*> 00a62628 	.word	0xa62628
+0+000370 <[^>]*> 00a62268 	.word	0xa62268
+0+000374 <[^>]*> 00a62668 	.word	0xa62668
+0+000378 <[^>]*> 00a62428 	.word	0xa62428
+0+00037c <[^>]*> 00a62068 	.word	0xa62068
+0+000380 <[^>]*> 00a62468 	.word	0xa62468
+0+000384 <[^>]*> 00a62059 	.word	0xa62059
+0+000388 <[^>]*> 00a62258 	.word	0xa62258
+0+00038c <[^>]*> 00a62259 	.word	0xa62259
+0+000390 <[^>]*> 00a620d8 	.word	0xa620d8
+0+000394 <[^>]*> 00a620d9 	.word	0xa620d9
+0+000398 <[^>]*> 00a622d8 	.word	0xa622d8
+0+00039c <[^>]*> 00a622d9 	.word	0xa622d9
+0+0003a0 <[^>]*> 00a62158 	.word	0xa62158
+0+0003a4 <[^>]*> 00a62159 	.word	0xa62159
+0+0003a8 <[^>]*> 00a62358 	.word	0xa62358
+0+0003ac <[^>]*> 00a62359 	.word	0xa62359
+0+0003b0 <[^>]*> 00a621d8 	.word	0xa621d8
+0+0003b4 <[^>]*> 00a621d9 	.word	0xa621d9
+0+0003b8 <[^>]*> 00a623d8 	.word	0xa623d8
+0+0003bc <[^>]*> 00a623d9 	.word	0xa623d9
+0+0003c0 <[^>]*> 00252642 	.word	0x252642
+0+0003c4 <[^>]*> 00c52046 	.word	0xc52046
+0+0003c8 <[^>]*> 0025267a 	.word	0x25267a
+0+0003cc <[^>]*> 0025267e 	.word	0x25267e
+0+0003d0 <[^>]*> 0025267e 	.word	0x25267e
+0+0003d4 <[^>]*> 00c52056 	.word	0xc52056
+0+0003d8 <[^>]*> 7000003f 	sdbbp
+0+0003dc <[^>]*> 7000003e 	.word	0x7000003e
+0+0003e0 <[^>]*> 7003183d 	.word	0x7003183d
+0+0003e4 <[^>]*> 7083183d 	.word	0x7083183d
+0+0003e8 <[^>]*> 4004c803 	mfc0	a0,c0_perfcnt,3
+0+0003ec <[^>]*> 4004c802 	mfc0	a0,c0_perfcnt,2
+0+0003f0 <[^>]*> 4084c803 	mtc0	a0,c0_perfcnt,3
+0+0003f4 <[^>]*> 4084c802 	mtc0	a0,c0_perfcnt,2
+0+0003f8 <[^>]*> 4ac4100b 	c2	0xc4100b
+0+0003fc <[^>]*> 4886208b 	.word	0x4886208b
+0+000400 <[^>]*> 4bcf218b 	c2	0x1cf218b
+0+000404 <[^>]*> 4bdf310b 	c2	0x1df310b
+0+000408 <[^>]*> 4ac4100c 	c2	0xc4100c
+0+00040c <[^>]*> 4886208c 	.word	0x4886208c
+0+000410 <[^>]*> 4bcf218c 	c2	0x1cf218c
+0+000414 <[^>]*> 4bdf310c 	c2	0x1df310c
+0+000418 <[^>]*> 4ac20001 	c2	0xc20001
+0+00041c <[^>]*> 48862001 	mtc2	a2,\$4,1
+0+000420 <[^>]*> 4bcf3001 	c2	0x1cf3001
+0+000424 <[^>]*> 4bdf2001 	c2	0x1df2001
+0+000428 <[^>]*> 4ac20005 	c2	0xc20005
+0+00042c <[^>]*> 48862005 	mtc2	a2,\$4,5
+0+000430 <[^>]*> 4bcf3005 	c2	0x1cf3005
+0+000434 <[^>]*> 4bdf2005 	c2	0x1df2005
+0+000438 <[^>]*> 4ac20004 	c2	0xc20004
+0+00043c <[^>]*> 48862004 	mtc2	a2,\$4,4
+0+000440 <[^>]*> 4bcf3004 	c2	0x1cf3004
+0+000444 <[^>]*> 4bdf2004 	c2	0x1df2004
+0+000448 <[^>]*> 4ac41007 	c2	0xc41007
+0+00044c <[^>]*> 48862087 	.word	0x48862087
+0+000450 <[^>]*> 4bcf2187 	c2	0x1cf2187
+0+000454 <[^>]*> 4bdf3107 	c2	0x1df3107
+0+000458 <[^>]*> 4ac41006 	c2	0xc41006
+0+00045c <[^>]*> 48862086 	.word	0x48862086
+0+000460 <[^>]*> 4bcf2186 	c2	0x1cf2186
+0+000464 <[^>]*> 4bdf3106 	c2	0x1df3106
+0+000468 <[^>]*> 4ac41030 	c2	0xc41030
+0+00046c <[^>]*> 488620b0 	.word	0x488620b0
+0+000470 <[^>]*> 4bcf21b0 	c2	0x1cf21b0
+0+000474 <[^>]*> 4bdf3130 	c2	0x1df3130
+0+000478 <[^>]*> 4ac20033 	c2	0xc20033
+0+00047c <[^>]*> 48862033 	.word	0x48862033
+0+000480 <[^>]*> 4bcf3033 	c2	0x1cf3033
+0+000484 <[^>]*> 4bdf2033 	c2	0x1df2033
+0+000488 <[^>]*> 4ac20433 	c2	0xc20433
+0+00048c <[^>]*> 48862433 	.word	0x48862433
+0+000490 <[^>]*> 4bcf3433 	c2	0x1cf3433
+0+000494 <[^>]*> 4bdf2433 	c2	0x1df2433
+0+000498 <[^>]*> 4ac20032 	c2	0xc20032
+0+00049c <[^>]*> 48862032 	.word	0x48862032
+0+0004a0 <[^>]*> 4bcf3032 	c2	0x1cf3032
+0+0004a4 <[^>]*> 4bdf2032 	c2	0x1df2032
+0+0004a8 <[^>]*> 4ac20432 	c2	0xc20432
+0+0004ac <[^>]*> 48862432 	.word	0x48862432
+0+0004b0 <[^>]*> 4bcf3432 	c2	0x1cf3432
+0+0004b4 <[^>]*> 4bdf2432 	c2	0x1df2432
+0+0004b8 <[^>]*> 4ac4100f 	c2	0xc4100f
+0+0004bc <[^>]*> 4886208f 	.word	0x4886208f
+0+0004c0 <[^>]*> 4bcf218f 	c2	0x1cf218f
+0+0004c4 <[^>]*> 4bdf310f 	c2	0x1df310f
+0+0004c8 <[^>]*> 4ac4100e 	c2	0xc4100e
+0+0004cc <[^>]*> 4886208e 	.word	0x4886208e
+0+0004d0 <[^>]*> 4bcf218e 	c2	0x1cf218e
+0+0004d4 <[^>]*> 4bdf310e 	c2	0x1df310e
+0+0004d8 <[^>]*> 4ac41002 	c2	0xc41002
+0+0004dc <[^>]*> 48862082 	.word	0x48862082
+0+0004e0 <[^>]*> 4bcf2182 	c2	0x1cf2182
+0+0004e4 <[^>]*> 4bdf3102 	c2	0x1df3102
+0+0004e8 <[^>]*> 4ac41003 	c2	0xc41003
+0+0004ec <[^>]*> 48862083 	.word	0x48862083
+0+0004f0 <[^>]*> 4bcf2183 	c2	0x1cf2183
+0+0004f4 <[^>]*> 4bdf3103 	c2	0x1df3103
+0+0004f8 <[^>]*> 4ac4100a 	c2	0xc4100a
+0+0004fc <[^>]*> 4886208a 	.word	0x4886208a
+0+000500 <[^>]*> 4bcf218a 	c2	0x1cf218a
+0+000504 <[^>]*> 4bdf310a 	c2	0x1df310a
+0+000508 <[^>]*> 4ac4100d 	c2	0xc4100d
+0+00050c <[^>]*> 4886208d 	.word	0x4886208d
+0+000510 <[^>]*> 4bcf218d 	c2	0x1cf218d
+0+000514 <[^>]*> 4bdf310d 	c2	0x1df310d
+0+000518 <[^>]*> 48a41018 	.word	0x48a41018
+0+00051c <[^>]*> 4984101f 	.word	0x4984101f
+0+000520 <[^>]*> 49c4101f 	.word	0x49c4101f
+0+000524 <[^>]*> 4904101f 	bc2f	\$cc1,0+0045a4 <[^>]*>
+0+000528 <[^>]*> 4944101f 	.word	0x4944101f
+0+00052c <[^>]*> 48c62090 	.word	0x48c62090
+0+000530 <[^>]*> 4bce3110 	c2	0x1ce3110
+0+000534 <[^>]*> 48c62092 	.word	0x48c62092
+0+000538 <[^>]*> 4bce3112 	c2	0x1ce3112
+0+00053c <[^>]*> 4bcd00a0 	c2	0x1cd00a0
+0+000540 <[^>]*> 4a0000bf 	c2	0xbf
+0+000544 <[^>]*> 480000bf 	.word	0x480000bf
+0+000548 <[^>]*> 490000bf 	bc2f	0+000848 <[^>]*>
+0+00054c <[^>]*> 4a00103e 	c2	0x103e
+0+000550 <[^>]*> 4804103e 	.word	0x4804103e
+0+000554 <[^>]*> 00c52046 	.word	0xc52046
+0+000558 <[^>]*> 00252442 	.word	0x252442
+0+00055c <[^>]*> 00c52056 	.word	0xc52056
+0+000560 <[^>]*> 0025207e 	.word	0x25207e
+0+000564 <[^>]*> 002520ba 	.word	0x2520ba
+0+000568 <[^>]*> 4ca4200f 	prefx	0x4,a0\(a1\)
+0+00056c <[^>]*> 42000020 	wait
+0+000570 <[^>]*> 42000020 	wait
+0+000574 <[^>]*> 4359e260 	wait	0x56789
+0+000578 <[^>]*> 00000040 	ssnop
+0+00057c <[^>]*> 70831821 	clo	v1,a0
+0+000580 <[^>]*> 70831825 	dclo	v1,a0
+0+000584 <[^>]*> 70831820 	clz	v1,a0
+0+000588 <[^>]*> 70831824 	dclz	v1,a0
+0+00058c <[^>]*> 4c440005 	luxc1	\$f0,a0\(v0\)
+0+000590 <[^>]*> 4c44100d 	suxc1	\$f2,a0\(v0\)
+0+000594 <[^>]*> 42000008 	tlbp
+0+000598 <[^>]*> 42000001 	tlbr
 	\.\.\.
Index: binutils-gdb/ld/testsuite/ld-mips-elf/jaloverflow-2.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/jaloverflow-2.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/jaloverflow-2.d
@@ -4,5 +4,5 @@
 #ld: -Ttext=0x20000000 -e start
 #objdump: -dr
 #...
-0*20000000:	0c000000.*
+ *20000000:	0c000000.*
 #pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/jalx-1.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/jalx-1.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/jalx-1.d
@@ -7,10 +7,10 @@
 
 Disassembly of section \.text:
 
-88000000 <test>:
-88000000:	f200 0002 	jalx	88000008 <test1>
-88000004:	0000 0000 	nop
+0*88000000 <test>:
+ *88000000:	f200 0002 	jalx	88000008 <test1>
+ *88000004:	0000 0000 	nop
 
-88000008 <test1>:
-88000008:	00851821 	addu	v1,a0,a1
+0*88000008 <test1>:
+ *88000008:	00851821 	addu	v1,a0,a1
 	\.\.\.
Index: binutils-gdb/ld/testsuite/ld-mips-elf/reloc-estimate-1.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/reloc-estimate-1.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/reloc-estimate-1.d
@@ -8,8 +8,8 @@
 
 DYNAMIC RELOCATION RECORDS
 OFFSET +TYPE +VALUE
-00000000 R_MIPS_NONE       \*ABS\*
-00010000 R_MIPS_REL32      foo@@V2
+0+000000 R_MIPS_NONE       \*ABS\*
+0+010000 R_MIPS_REL32      foo@@V2
 
 
 # The address must be 0x810.  We should only ever allocate one dynamic

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

* [committed 14/16] testsuite: Handle composed R_MIPS_NONE relocations
  2023-07-28  5:06 [committed 00/16] MIPS: Revert the change of `mipsisa64*-*-linux*' semantics Maciej W. Rozycki
                   ` (12 preceding siblings ...)
  2023-07-28  5:07 ` [committed 13/16] MIPS/testsuite: Handle 64-bit addresses Maciej W. Rozycki
@ 2023-07-28  5:07 ` Maciej W. Rozycki
  2023-07-28  5:07 ` [committed 15/16] MIPS/GAS/testsuite: Fix n64 compact EH failures Maciej W. Rozycki
  2023-07-28  5:07 ` [committed 16/16] MIPS: Support `-gnuabi64' target triplet suffix for 64-bit Linux targets Maciej W. Rozycki
  15 siblings, 0 replies; 17+ messages in thread
From: Maciej W. Rozycki @ 2023-07-28  5:07 UTC (permalink / raw)
  To: Nick Clifton; +Cc: YunQiang Su, binutils

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

MIPS n64 ABI has a peculiarity where all relocations are composed of 
three, with subsequent relocation types set to R_MIPS_NONE if further 
calculation is not required.  Example output produced by `readelf' and 
`objdump' for such relocations is:

  Offset          Info           Type           Sym. Value    Sym. Name + Addend
000000000000  000800000002 R_MIPS_32         0000000000000000 foo + 0
                    Type2: R_MIPS_NONE
                    Type3: R_MIPS_NONE

and:

OFFSET           TYPE              VALUE
0000000000000000 R_MIPS_32         foo
0000000000000000 R_MIPS_NONE       *ABS*
0000000000000000 R_MIPS_NONE       *ABS*

respectively.  The presence of these extra R_MIPS_NONE entries is not 
relevant for generic or even some MIPS tests, so optionally match them 
with the respective dump patterns, also discarding `xfail' annotation 
for MIPS/OpenBSD targets from gas/elf/missing-build-notes.d, removing 
these regressions:

mips64-openbsd  -FAIL: readelf -r bintest
mips64-openbsd  -FAIL: forward expression
mips64-openbsd  -FAIL: assignment tests
mips64-openbsd  -FAIL: gas/all/none
mips64-openbsd  -XFAIL: gas/elf/missing-build-notes
mips64-openbsd  -FAIL: macro test 2
mips64-openbsd  -FAIL: macro irp
mips64-openbsd  -FAIL: macro rept
mips64-openbsd  -FAIL: nested irp/irpc/rept
mips64-openbsd  -FAIL: macro vararg
mips64-openbsd  -FAIL: mips jalx
mips64-openbsd  -FAIL: ST Microelectronics Loongson-2F workarounds of Jump Instruction issue
mips64el-openbsd  -FAIL: readelf -r bintest
mips64el-openbsd  -FAIL: forward expression
mips64el-openbsd  -FAIL: assignment tests
mips64el-openbsd  -FAIL: gas/all/none
mips64el-openbsd  -XFAIL: gas/elf/missing-build-notes
mips64el-openbsd  -FAIL: macro test 2
mips64el-openbsd  -FAIL: macro irp
mips64el-openbsd  -FAIL: macro rept
mips64el-openbsd  -FAIL: nested irp/irpc/rept
mips64el-openbsd  -FAIL: macro vararg
mips64el-openbsd  -FAIL: mips jalx
mips64el-openbsd  -FAIL: ST Microelectronics Loongson-2F workarounds of Jump Instruction issue

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

	binutils/
	* testsuite/binutils-all/readelf.r-64: Optionally match extra 
	R_MIPS_NONE pairs.

	gas/
	* testsuite/gas/all/assign.d: Optionally match extra 
	R_MIPS_NONE pairs.
	* testsuite/gas/all/fwdexp.d: Likewise.
	* testsuite/gas/all/none.d: Likewise.
	* testsuite/gas/macros/irp.d: Likewise.
	* testsuite/gas/macros/repeat.d: Likewise.
	* testsuite/gas/macros/rept.d: Likewise.
	* testsuite/gas/macros/test2.d: Likewise.
	* testsuite/gas/macros/vararg.d: Likewise.
	* testsuite/gas/mips/compact-eh-eb-1.d: Likewise.
	* testsuite/gas/mips/compact-eh-eb-2.d: Likewise.
	* testsuite/gas/mips/compact-eh-eb-3.d: Likewise.
	* testsuite/gas/mips/compact-eh-eb-4.d: Likewise.
	* testsuite/gas/mips/compact-eh-eb-5.d: Likewise.
	* testsuite/gas/mips/compact-eh-eb-6.d: Likewise.
	* testsuite/gas/mips/compact-eh-el-1.d: Likewise.
	* testsuite/gas/mips/compact-eh-el-2.d: Likewise.
	* testsuite/gas/mips/compact-eh-el-3.d: Likewise.
	* testsuite/gas/mips/compact-eh-el-4.d: Likewise.
	* testsuite/gas/mips/compact-eh-el-5.d: Likewise.
	* testsuite/gas/mips/compact-eh-el-6.d: Likewise.
	* testsuite/gas/mips/loongson-2f-3.d: Likewise.
	* testsuite/gas/mips/mips-jalx.d: Likewise.
	* testsuite/gas/elf/missing-build-notes.d: Likewise.  Remove 
	the `xfail' tag.

	ld/
	* testsuite/ld-mips-elf/reloc-estimate-1.d: Optionally match 
	extra R_MIPS_NONE pairs.
---
 binutils/testsuite/binutils-all/readelf.r-64 |    2 
 gas/testsuite/gas/all/assign.d               |    4 +
 gas/testsuite/gas/all/fwdexp.d               |    2 
 gas/testsuite/gas/all/none.d                 |    2 
 gas/testsuite/gas/elf/missing-build-notes.d  |    9 +++
 gas/testsuite/gas/macros/irp.d               |   12 ++++
 gas/testsuite/gas/macros/repeat.d            |   72 +++++++++++++++++++++++++++
 gas/testsuite/gas/macros/rept.d              |    6 ++
 gas/testsuite/gas/macros/test2.d             |    6 ++
 gas/testsuite/gas/macros/vararg.d            |   12 ++++
 gas/testsuite/gas/mips/compact-eh-eb-1.d     |    2 
 gas/testsuite/gas/mips/compact-eh-eb-2.d     |    8 +++
 gas/testsuite/gas/mips/compact-eh-eb-3.d     |    4 +
 gas/testsuite/gas/mips/compact-eh-eb-4.d     |    4 +
 gas/testsuite/gas/mips/compact-eh-eb-5.d     |    8 +++
 gas/testsuite/gas/mips/compact-eh-eb-6.d     |    4 +
 gas/testsuite/gas/mips/compact-eh-el-1.d     |    2 
 gas/testsuite/gas/mips/compact-eh-el-2.d     |    8 +++
 gas/testsuite/gas/mips/compact-eh-el-3.d     |    4 +
 gas/testsuite/gas/mips/compact-eh-el-4.d     |    4 +
 gas/testsuite/gas/mips/compact-eh-el-5.d     |    8 +++
 gas/testsuite/gas/mips/compact-eh-el-6.d     |    4 +
 gas/testsuite/gas/mips/loongson-2f-3.d       |    2 
 gas/testsuite/gas/mips/mips-jalx.d           |    2 
 ld/testsuite/ld-mips-elf/reloc-estimate-1.d  |    4 +
 25 files changed, 194 insertions(+), 1 deletion(-)

binutils-yunqiang-test-r-mips-none.diff
Index: binutils-gdb/binutils/testsuite/binutils-all/readelf.r-64
===================================================================
--- binutils-gdb.orig/binutils/testsuite/binutils-all/readelf.r-64
+++ binutils-gdb/binutils/testsuite/binutils-all/readelf.r-64
@@ -2,3 +2,5 @@
 Relocation section '.rel.*text' at offset 0x.* contains 1 entry:
   Offset          Info           Type           Sym. Value    Sym. Name.*
 0+04  [0-9A-Fa-f]+ *R_.*0+00 external_symbol.*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
Index: binutils-gdb/gas/testsuite/gas/all/assign.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/all/assign.d
+++ binutils-gdb/gas/testsuite/gas/all/assign.d
@@ -3,5 +3,9 @@
 
 #...
 .*zzz.*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 .*zzz.*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 #pass
Index: binutils-gdb/gas/testsuite/gas/all/fwdexp.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/all/fwdexp.d
+++ binutils-gdb/gas/testsuite/gas/all/fwdexp.d
@@ -6,6 +6,8 @@
 RELOCATION RECORDS FOR .*
 OFFSET +TYPE +VALUE
 0+ .*(\.data|label_i)(|\+0xf+e|\+0xf+c|\+0xf+8|-0x0*2|-0x0*4|-0x0*8)
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 Contents of section .*
  0+ (0+|feff|fffe|fcffffff|fffffffc|f8ffffff|f8ffffff ffffffff|ffffffff fffffff8|0+4) .*
Index: binutils-gdb/gas/testsuite/gas/all/none.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/all/none.d
+++ binutils-gdb/gas/testsuite/gas/all/none.d
@@ -5,3 +5,5 @@
 
 #...
 0+ .*(NONE|NULL|UNUSED0) +\*ABS\*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
Index: binutils-gdb/gas/testsuite/gas/elf/missing-build-notes.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/elf/missing-build-notes.d
+++ binutils-gdb/gas/testsuite/gas/elf/missing-build-notes.d
@@ -1,6 +1,5 @@
 # as: --generate-missing-build-notes=yes
 # objdump: -r
-#xfail: mips*-*-openbsd
 
 # Check that the relocations are for increasing addresses...
 
@@ -8,7 +7,15 @@
 RELOCATION RECORDS FOR \[.gnu.build.attributes\]:
 OFFSET +TYPE +VALUE
 0+014 .*[ 	]+.*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+0(18|1c) .*[ 	]+.*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+0(30|38) .*[ 	]+.*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+0(34|40) .*[ 	]+.*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 #pass
Index: binutils-gdb/gas/testsuite/gas/macros/irp.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/macros/irp.d
+++ binutils-gdb/gas/testsuite/gas/macros/irp.d
@@ -8,9 +8,21 @@
 RELOCATION RECORDS FOR .*
 OFFSET[ 	]+TYPE[ 	]+VALUE.*
 0+00[ 	]+[a-zA-Z0-9_]+[ 	]+foo1
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+04[ 	]+[a-zA-Z0-9_]+[ 	]+foo2
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+08[ 	]+[a-zA-Z0-9_]+[ 	]+foo3
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+0c[ 	]+[a-zA-Z0-9_]+[ 	]+bar1
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+10[ 	]+[a-zA-Z0-9_]+[ 	]+bar2
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+14[ 	]+[a-zA-Z0-9_]+[ 	]+bar3
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 #pass
Index: binutils-gdb/gas/testsuite/gas/macros/repeat.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/macros/repeat.d
+++ binutils-gdb/gas/testsuite/gas/macros/repeat.d
@@ -8,39 +8,111 @@
 RELOCATION RECORDS FOR .*
 OFFSET[ 	]+TYPE[ 	]+VALUE.*
 0+00[ 	]+[a-zA-Z0-9_]+[ 	]+irp_irp_19
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+04[ 	]+[a-zA-Z0-9_]+[ 	]+irp_irp_18
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+08[ 	]+[a-zA-Z0-9_]+[ 	]+irp_irp_29
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+0c[ 	]+[a-zA-Z0-9_]+[ 	]+irp_irp_28
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+10[ 	]+[a-zA-Z0-9_]+[ 	]+irp_irpc_19
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+14[ 	]+[a-zA-Z0-9_]+[ 	]+irp_irpc_18
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+18[ 	]+[a-zA-Z0-9_]+[ 	]+irp_irpc_29
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+1c[ 	]+[a-zA-Z0-9_]+[ 	]+irp_irpc_28
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+20[ 	]+[a-zA-Z0-9_]+[ 	]+irp_rept_1
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+24[ 	]+[a-zA-Z0-9_]+[ 	]+irp_rept_1
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+28[ 	]+[a-zA-Z0-9_]+[ 	]+irp_rept_2
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+2c[ 	]+[a-zA-Z0-9_]+[ 	]+irp_rept_2
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+30[ 	]+[a-zA-Z0-9_]+[ 	]+irpc_irp_19
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+34[ 	]+[a-zA-Z0-9_]+[ 	]+irpc_irp_18
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+38[ 	]+[a-zA-Z0-9_]+[ 	]+irpc_irp_29
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+3c[ 	]+[a-zA-Z0-9_]+[ 	]+irpc_irp_28
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+40[ 	]+[a-zA-Z0-9_]+[ 	]+irpc_irpc_19
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+44[ 	]+[a-zA-Z0-9_]+[ 	]+irpc_irpc_18
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+48[ 	]+[a-zA-Z0-9_]+[ 	]+irpc_irpc_29
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+4c[ 	]+[a-zA-Z0-9_]+[ 	]+irpc_irpc_28
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+50[ 	]+[a-zA-Z0-9_]+[ 	]+irpc_rept_1
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+54[ 	]+[a-zA-Z0-9_]+[ 	]+irpc_rept_1
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+58[ 	]+[a-zA-Z0-9_]+[ 	]+irpc_rept_2
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+5c[ 	]+[a-zA-Z0-9_]+[ 	]+irpc_rept_2
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+60[ 	]+[a-zA-Z0-9_]+[ 	]+rept_irp_9
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+64[ 	]+[a-zA-Z0-9_]+[ 	]+rept_irp_8
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+68[ 	]+[a-zA-Z0-9_]+[ 	]+rept_irp_9
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+6c[ 	]+[a-zA-Z0-9_]+[ 	]+rept_irp_8
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+70[ 	]+[a-zA-Z0-9_]+[ 	]+rept_irpc_9
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+74[ 	]+[a-zA-Z0-9_]+[ 	]+rept_irpc_8
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+78[ 	]+[a-zA-Z0-9_]+[ 	]+rept_irpc_9
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+7c[ 	]+[a-zA-Z0-9_]+[ 	]+rept_irpc_8
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+80[ 	]+[a-zA-Z0-9_]+[ 	]+rept_rept
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+84[ 	]+[a-zA-Z0-9_]+[ 	]+rept_rept
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+88[ 	]+[a-zA-Z0-9_]+[ 	]+rept_rept
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+8c[ 	]+[a-zA-Z0-9_]+[ 	]+rept_rept
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 #pass
Index: binutils-gdb/gas/testsuite/gas/macros/rept.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/macros/rept.d
+++ binutils-gdb/gas/testsuite/gas/macros/rept.d
@@ -8,6 +8,12 @@
 RELOCATION RECORDS FOR .*
 OFFSET[ 	]+TYPE[ 	]+VALUE.*
 0+00[ 	]+[a-zA-Z0-9_]+[ 	]+foo1
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+04[ 	]+[a-zA-Z0-9_]+[ 	]+foo1
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+08[ 	]+[a-zA-Z0-9_]+[ 	]+foo1
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 #pass
Index: binutils-gdb/gas/testsuite/gas/macros/test2.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/macros/test2.d
+++ binutils-gdb/gas/testsuite/gas/macros/test2.d
@@ -8,6 +8,12 @@
 RELOCATION RECORDS FOR .*
 OFFSET[ 	]+TYPE[ 	]+VALUE.*
 0+00[ 	]+[a-zA-Z0-9_]+[ 	]+foo1
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+04[ 	]+[a-zA-Z0-9_]+[ 	]+foo2
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+08[ 	]+[a-zA-Z0-9_]+[ 	]+foo3
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 #pass
Index: binutils-gdb/gas/testsuite/gas/macros/vararg.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/macros/vararg.d
+++ binutils-gdb/gas/testsuite/gas/macros/vararg.d
@@ -8,9 +8,21 @@
 RELOCATION RECORDS FOR .*
 OFFSET[ 	]+TYPE[ 	]+VALUE.*
 0+00[ 	]+[a-zA-Z0-9_]+[ 	]+foo1
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+04[ 	]+[a-zA-Z0-9_]+[ 	]+foo2
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+08[ 	]+[a-zA-Z0-9_]+[ 	]+foo3
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+0c[ 	]+[a-zA-Z0-9_]+[ 	]+foo4
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+10[ 	]+[a-zA-Z0-9_]+[ 	]+foo5
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+14[ 	]+[a-zA-Z0-9_]+[ 	]+foo6
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 #pass
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-1.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-eb-1.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-1.d
@@ -9,6 +9,8 @@
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
 0+000000 R_MIPS_PC32       .text.*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 
 Contents of section .text:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-2.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-eb-2.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-2.d
@@ -9,17 +9,25 @@
 RELOCATION RECORDS FOR \[.data.DW.ref.__gnu_compact_pr2\]:
 OFFSET +TYPE +VALUE
 0+000000 R_MIPS_32         __gnu_compact_pr2
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 
 RELOCATION RECORDS FOR \[.gnu_extab\]:
 OFFSET +TYPE +VALUE
 0+000001 R_MIPS_PC32       DW.ref.__gnu_compact_pr2
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
 0+000000 R_MIPS_PC32       .text.*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+000004 R_MIPS_PC32       .gnu_extab
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 
 Contents of section .group:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-3.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-eb-3.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-3.d
@@ -9,7 +9,11 @@
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
 0+000000 R_MIPS_PC32       .text.*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+000004 R_MIPS_PC32       .gnu_extab
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 
 Contents of section .text:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-4.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-eb-4.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-4.d
@@ -9,7 +9,11 @@
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
 0+000000 R_MIPS_PC32       .text.*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+000004 R_MIPS_PC32       .gnu_extab
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 
 Contents of section .text:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-5.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-eb-5.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-5.d
@@ -9,17 +9,25 @@
 RELOCATION RECORDS FOR \[.data.DW.ref.__gnu_compact_pr2\]:
 OFFSET +TYPE +VALUE
 0+000000 R_MIPS_32         __gnu_compact_pr2
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 
 RELOCATION RECORDS FOR \[.gnu_extab\]:
 OFFSET +TYPE +VALUE
 0+000001 R_MIPS_PC32       DW.ref.__gnu_compact_pr2
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
 0+000000 R_MIPS_PC32       .text.*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+000004 R_MIPS_PC32       .gnu_extab
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 
 Contents of section .group:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-6.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-eb-6.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-6.d
@@ -9,7 +9,11 @@
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
 0+000000 R_MIPS_PC32       .text.*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+000004 R_MIPS_PC32       .gnu_extab
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 
 Contents of section .text:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-1.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-el-1.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-1.d
@@ -9,6 +9,8 @@
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
 0+000000 R_MIPS_PC32       .text.*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 
 Contents of section .text:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-2.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-el-2.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-2.d
@@ -9,17 +9,25 @@
 RELOCATION RECORDS FOR \[.data.DW.ref.__gnu_compact_pr2\]:
 OFFSET +TYPE +VALUE
 0+000000 R_MIPS_32         __gnu_compact_pr2
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 
 RELOCATION RECORDS FOR \[.gnu_extab\]:
 OFFSET +TYPE +VALUE
 0+000001 R_MIPS_PC32       DW.ref.__gnu_compact_pr2
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
 0+000000 R_MIPS_PC32       .text.*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+000004 R_MIPS_PC32       .gnu_extab
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 
 Contents of section .group:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-3.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-el-3.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-3.d
@@ -9,7 +9,11 @@
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
 0+000000 R_MIPS_PC32       .text.*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+000004 R_MIPS_PC32       .gnu_extab
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 
 Contents of section .text:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-4.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-el-4.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-4.d
@@ -9,7 +9,11 @@
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
 0+000000 R_MIPS_PC32       .text.*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+000004 R_MIPS_PC32       .gnu_extab
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 
 Contents of section .text:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-5.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-el-5.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-5.d
@@ -8,17 +8,25 @@
 RELOCATION RECORDS FOR \[.data.DW.ref.__gnu_compact_pr2\]:
 OFFSET +TYPE +VALUE
 0+000000 R_MIPS_32         __gnu_compact_pr2
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 
 RELOCATION RECORDS FOR \[.gnu_extab\]:
 OFFSET +TYPE +VALUE
 0+000001 R_MIPS_PC32       DW.ref.__gnu_compact_pr2
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
 0+000000 R_MIPS_PC32       .text.*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+000004 R_MIPS_PC32       .gnu_extab
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 
 Contents of section .group:
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-6.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-el-6.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-6.d
@@ -9,7 +9,11 @@
 RELOCATION RECORDS FOR \[.eh_frame_entry\]:
 OFFSET +TYPE +VALUE
 0+000000 R_MIPS_PC32       .text.*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+000004 R_MIPS_PC32       .gnu_extab
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 
 Contents of section .text:
Index: binutils-gdb/gas/testsuite/gas/mips/loongson-2f-3.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/loongson-2f-3.d
+++ binutils-gdb/gas/testsuite/gas/mips/loongson-2f-3.d
@@ -30,5 +30,7 @@
 
   44:	08000000 	j	0x0
 			44: R_MIPS_26	external_label
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
   48:	00000000 	nop
   4c:	00000000 	nop
Index: binutils-gdb/gas/testsuite/gas/mips/mips-jalx.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/mips-jalx.d
+++ binutils-gdb/gas/testsuite/gas/mips/mips-jalx.d
@@ -6,6 +6,8 @@
 0+000000 <.text>:
    0:	74000000 	jalx	0x0
 			0: R_MIPS_26	external_label
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
    4:	00000000 	nop
    8:	00000000 	nop
    c:	00000000 	nop
Index: binutils-gdb/ld/testsuite/ld-mips-elf/reloc-estimate-1.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/reloc-estimate-1.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/reloc-estimate-1.d
@@ -9,7 +9,11 @@
 DYNAMIC RELOCATION RECORDS
 OFFSET +TYPE +VALUE
 0+000000 R_MIPS_NONE       \*ABS\*
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 0+010000 R_MIPS_REL32      foo@@V2
+#?.*R_MIPS_NONE.*
+#?.*R_MIPS_NONE.*
 
 
 # The address must be 0x810.  We should only ever allocate one dynamic

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

* [committed 15/16] MIPS/GAS/testsuite: Fix n64 compact EH failures
  2023-07-28  5:06 [committed 00/16] MIPS: Revert the change of `mipsisa64*-*-linux*' semantics Maciej W. Rozycki
                   ` (13 preceding siblings ...)
  2023-07-28  5:07 ` [committed 14/16] testsuite: Handle composed R_MIPS_NONE relocations Maciej W. Rozycki
@ 2023-07-28  5:07 ` Maciej W. Rozycki
  2023-07-28  5:07 ` [committed 16/16] MIPS: Support `-gnuabi64' target triplet suffix for 64-bit Linux targets Maciej W. Rozycki
  15 siblings, 0 replies; 17+ messages in thread
From: Maciej W. Rozycki @ 2023-07-28  5:07 UTC (permalink / raw)
  To: Nick Clifton; +Cc: YunQiang Su, binutils

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

Expect a `.MIPS.options' section alternatively to `.reginfo' and ignore 
contents of either as irrelevant for all the affected compact EH tests, 
removing these regressions:

mips64-openbsd  -FAIL: Compact EH EB #1 with personality ID and FDE data
mips64-openbsd  -FAIL: Compact EH EB #2 with personality routine and FDE data
mips64-openbsd  -FAIL: Compact EH EB #3 with personality id and large FDE data
mips64-openbsd  -FAIL: Compact EH EB #4 with personality id, FDE data and LSDA
mips64-openbsd  -FAIL: Compact EH EB #5 with personality routine, FDE data and LSDA
mips64-openbsd  -FAIL: Compact EH EB #6 with personality id, LSDA and large FDE data
mips64-openbsd  -FAIL: Compact EH EL #1 with personality ID and FDE data
mips64-openbsd  -FAIL: Compact EH EL #2 with personality routine and FDE data
mips64-openbsd  -FAIL: Compact EH EL #3 with personality id and large FDE data
mips64-openbsd  -FAIL: Compact EH EL #4 with personality id, FDE data and LSDA
mips64-openbsd  -FAIL: Compact EH EL #5 with personality routine, FDE data and LSDA
mips64-openbsd  -FAIL: Compact EH EL #6 with personality id, LSDA and large FDE data
mips64el-openbsd  -FAIL: Compact EH EB #1 with personality ID and FDE data
mips64el-openbsd  -FAIL: Compact EH EB #2 with personality routine and FDE data
mips64el-openbsd  -FAIL: Compact EH EB #3 with personality id and large FDE data
mips64el-openbsd  -FAIL: Compact EH EB #4 with personality id, FDE data and LSDA
mips64el-openbsd  -FAIL: Compact EH EB #5 with personality routine, FDE data and LSDA
mips64el-openbsd  -FAIL: Compact EH EB #6 with personality id, LSDA and large FDE data
mips64el-openbsd  -FAIL: Compact EH EL #1 with personality ID and FDE data
mips64el-openbsd  -FAIL: Compact EH EL #2 with personality routine and FDE data
mips64el-openbsd  -FAIL: Compact EH EL #3 with personality id and large FDE data
mips64el-openbsd  -FAIL: Compact EH EL #4 with personality id, FDE data and LSDA
mips64el-openbsd  -FAIL: Compact EH EL #5 with personality routine, FDE data and LSDA
mips64el-openbsd  -FAIL: Compact EH EL #6 with personality id, LSDA and large FDE data

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

	gas/
	* testsuite/gas/mips/compact-eh-eb-1.d: Accept `.MIPS.options' 
	section as an alternative to `.reginfo' and ignore contents of 
	either.
	* testsuite/gas/mips/compact-eh-eb-2.d: Likewise.
	* testsuite/gas/mips/compact-eh-eb-3.d: Likewise.
	* testsuite/gas/mips/compact-eh-eb-4.d: Likewise.
	* testsuite/gas/mips/compact-eh-eb-5.d: Likewise.
	* testsuite/gas/mips/compact-eh-eb-6.d: Likewise.
	* testsuite/gas/mips/compact-eh-el-1.d: Likewise.
	* testsuite/gas/mips/compact-eh-el-2.d: Likewise.
	* testsuite/gas/mips/compact-eh-el-3.d: Likewise.
	* testsuite/gas/mips/compact-eh-el-4.d: Likewise.
	* testsuite/gas/mips/compact-eh-el-5.d: Likewise.
	* testsuite/gas/mips/compact-eh-el-6.d: Likewise.
---
 gas/testsuite/gas/mips/compact-eh-eb-1.d |    5 ++---
 gas/testsuite/gas/mips/compact-eh-eb-2.d |    5 ++---
 gas/testsuite/gas/mips/compact-eh-eb-3.d |    5 ++---
 gas/testsuite/gas/mips/compact-eh-eb-4.d |    5 ++---
 gas/testsuite/gas/mips/compact-eh-eb-5.d |    5 ++---
 gas/testsuite/gas/mips/compact-eh-eb-6.d |    5 ++---
 gas/testsuite/gas/mips/compact-eh-el-1.d |    5 ++---
 gas/testsuite/gas/mips/compact-eh-el-2.d |    5 ++---
 gas/testsuite/gas/mips/compact-eh-el-3.d |    5 ++---
 gas/testsuite/gas/mips/compact-eh-el-4.d |    5 ++---
 gas/testsuite/gas/mips/compact-eh-el-5.d |    5 ++---
 gas/testsuite/gas/mips/compact-eh-el-6.d |    5 ++---
 12 files changed, 24 insertions(+), 36 deletions(-)

binutils-yunqiang-mips-gas-test-compact-eh-abi-section.diff
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-1.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-eb-1.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-1.d
@@ -15,9 +15,8 @@ OFFSET +TYPE +VALUE
 
 Contents of section .text:
  0000 00000000.*
-Contents of section .reginfo:
- 0000 00000000 00000000 00000000 00000000  .*
- 0010 00000000 00000000                    .*
+Contents of section (.reginfo|.MIPS.options):
+#...
 Contents of section .MIPS.abiflags:
  .*
  .*
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-2.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-eb-2.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-2.d
@@ -34,9 +34,8 @@ OFFSET +TYPE +VALUE
  0000 00000001 00000007 00000008          .*
 Contents of section .text:
  0000 00000000.*
-Contents of section .reginfo:
- 0000 00000000 00000000 00000000 00000000  .*
- 0010 00000000 00000000                    .*
+Contents of section (.reginfo|.MIPS.options):
+#...
 Contents of section .MIPS.abiflags:
  .*
  .*
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-3.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-eb-3.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-3.d
@@ -18,9 +18,8 @@ OFFSET +TYPE +VALUE
 
 Contents of section .text:
  0000 00000000.*
-Contents of section .reginfo:
- 0000 00000000 00000000 00000000 00000000  .*
- 0010 00000000 00000000                    .*
+Contents of section (.reginfo|.MIPS.options):
+#...
 Contents of section .MIPS.abiflags:
  .*
  .*
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-4.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-eb-4.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-4.d
@@ -19,9 +19,8 @@ OFFSET +TYPE +VALUE
 Contents of section .text:
  0000 00000000 00000000 00000000 00000000  .*
  0010 00000000.*
-Contents of section .reginfo:
- 0000 00000000 00000000 00000000 00000000  .*
- 0010 00000000 00000000                    .*
+Contents of section (.reginfo|.MIPS.options):
+#...
 Contents of section .MIPS.abiflags:
  .*
  .*
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-5.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-eb-5.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-5.d
@@ -35,9 +35,8 @@ OFFSET +TYPE +VALUE
 Contents of section .text:
  0000 00000000 00000000 00000000 00000000  .*
  0010 00000000.*
-Contents of section .reginfo:
- 0000 00000000 00000000 00000000 00000000  .*
- 0010 00000000 00000000                    .*
+Contents of section (.reginfo|.MIPS.options):
+#...
 Contents of section .MIPS.abiflags:
  .*
  .*
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-6.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-eb-6.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-6.d
@@ -19,9 +19,8 @@ OFFSET +TYPE +VALUE
 Contents of section .text:
  0000 00000000 00000000 00000000 00000000  .*
  0010 00000000.*
-Contents of section .reginfo:
- 0000 00000000 00000000 00000000 00000000  .*
- 0010 00000000 00000000                    .*
+Contents of section (.reginfo|.MIPS.options):
+#...
 Contents of section .MIPS.abiflags:
  .*
  .*
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-1.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-el-1.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-1.d
@@ -15,9 +15,8 @@ OFFSET +TYPE +VALUE
 
 Contents of section .text:
  0000 00000000.*
-Contents of section .reginfo:
- 0000 00000000 00000000 00000000 00000000  .*
- 0010 00000000 00000000                    .*
+Contents of section (.reginfo|.MIPS.options):
+#...
 Contents of section .MIPS.abiflags:
  .*
  .*
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-2.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-el-2.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-2.d
@@ -34,9 +34,8 @@ OFFSET +TYPE +VALUE
  0000 01000000 07000000 08000000           .*
 Contents of section .text:
  0000 00000000.*
-Contents of section .reginfo:
- 0000 00000000 00000000 00000000 00000000  .*
- 0010 00000000 00000000                    .*
+Contents of section (.reginfo|.MIPS.options):
+#...
 Contents of section .MIPS.abiflags:
  .*
  .*
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-3.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-el-3.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-3.d
@@ -18,9 +18,8 @@ OFFSET +TYPE +VALUE
 
 Contents of section .text:
  0000 00000000.*
-Contents of section .reginfo:
- 0000 00000000 00000000 00000000 00000000  .*
- 0010 00000000 00000000                    .*
+Contents of section (.reginfo|.MIPS.options):
+#...
 Contents of section .MIPS.abiflags:
  .*
  .*
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-4.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-el-4.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-4.d
@@ -19,9 +19,8 @@ OFFSET +TYPE +VALUE
 Contents of section .text:
  0000 00000000 00000000 00000000 00000000  .*
  0010 00000000.*
-Contents of section .reginfo:
- 0000 00000000 00000000 00000000 00000000  .*
- 0010 00000000 00000000                    .*
+Contents of section (.reginfo|.MIPS.options):
+#...
 Contents of section .MIPS.abiflags:
  .*
  .*
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-5.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-el-5.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-5.d
@@ -34,9 +34,8 @@ OFFSET +TYPE +VALUE
 Contents of section .text:
  0000 00000000 00000000 00000000 00000000  .*
  0010 00000000.*
-Contents of section .reginfo:
- 0000 00000000 00000000 00000000 00000000  .*
- 0010 00000000 00000000                    .*
+Contents of section (.reginfo|.MIPS.options):
+#...
 Contents of section .MIPS.abiflags:
  .*
  .*
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-6.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-el-6.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-6.d
@@ -19,9 +19,8 @@ OFFSET +TYPE +VALUE
 Contents of section .text:
  0000 00000000 00000000 00000000 00000000  .*
  0010 00000000.*
-Contents of section .reginfo:
- 0000 00000000 00000000 00000000 00000000  .*
- 0010 00000000 00000000                    .*
+Contents of section (.reginfo|.MIPS.options):
+#...
 Contents of section .MIPS.abiflags:
  .*
  .*

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

* [committed 16/16] MIPS: Support `-gnuabi64' target triplet suffix for 64-bit Linux targets
  2023-07-28  5:06 [committed 00/16] MIPS: Revert the change of `mipsisa64*-*-linux*' semantics Maciej W. Rozycki
                   ` (14 preceding siblings ...)
  2023-07-28  5:07 ` [committed 15/16] MIPS/GAS/testsuite: Fix n64 compact EH failures Maciej W. Rozycki
@ 2023-07-28  5:07 ` Maciej W. Rozycki
  15 siblings, 0 replies; 17+ messages in thread
From: Maciej W. Rozycki @ 2023-07-28  5:07 UTC (permalink / raw)
  To: Nick Clifton; +Cc: YunQiang Su, binutils

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

Make the n64 ABI the default for 64-bit Linux targets specified with
`-gnuabi64' suffix included in the target triplet, for configurations
such as the Debian mips64el and mips64r6el ports.  Adjust testsuite
configuration accordingly.

There are the following regressions with the new target triplet:

mips64-linux-gnuabi64  +FAIL: readelf -S bintest
mips64-linux-gnuabi64  +FAIL: MIPS reloc estimation 1
mips64el-linux-gnuabi64  +FAIL: readelf -S bintest
mips64el-linux-gnuabi64  +FAIL: MIPS reloc estimation 1

The `readelf' issue comes from a difference in section headers produced 
that the `binutils/testsuite/binutils-all/readelf.s-64' pattern template 
does not match.  While there has been a precedent it does not appear to 
me that there is a clear advantage from adding more and more variations 
to the template rather than forking the existing template into multiple 
ones for a more exact match.  So this is best deferred to a separate 
discussion.

The MIPS reloc estimation issue is an actual bug in `objdump', which 
discards a number of trailing entries from output here for n64 composed 
relocations:

DYNAMIC RELOCATION RECORDS
OFFSET           TYPE              VALUE
0000000000000000 R_MIPS_NONE       *ABS*
0000000000000000 R_MIPS_NONE       *ABS*

and consequently `ld/testsuite/ld-mips-elf/reloc-estimate-1.d' does not 
match even though ELF output produced is correct according to `readelf':

Relocation section '.rel.dyn' at offset 0x10400 contains 2 entries:
  Offset          Info           Type           Sym. Value    Sym. Name
000000000000  000000000000 R_MIPS_NONE
                    Type2: R_MIPS_NONE
                    Type3: R_MIPS_NONE
000000010000  000300001203 R_MIPS_REL32      0000000000010010 foo@@V2
                    Type2: R_MIPS_64
                    Type3: R_MIPS_NONE

As a genuine bug this has to be handled separately.

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

	bfd/
	* config.bfd: Add `mips64*el-*-linux*-gnuabi64' and 
	`mips64*-*-linux*-gnuabi64' targets.

	binutils/
	* testsuite/binutils-all/mips/mips.exp: Handle `*-*-*-gnuabi64' 
	targets.
	* testsuite/binutils-all/objcopy.exp: Handle 
	`mips64*-*-*-gnuabi64' targets.
	* testsuite/binutils-all/remove-relocs-01.d: Likewise.
	* testsuite/binutils-all/remove-relocs-04.d: Likewise.
	* testsuite/binutils-all/remove-relocs-05.d: Likewise.
	* testsuite/binutils-all/remove-relocs-06.d: Likewise.

	gas/
	* configure.ac: Handle `mips64*-linux-gnuabi64' targets.
	* configure: Regenerate.
	* testsuite/gas/mips/compact-eh-eb-7.d: Handle 
	`mips64*-*-*-gnuabi64' targets.
	* testsuite/gas/mips/compact-eh-el-7.d: Likewise.

	ld/
	* configure.tgt: Add `mips64*el-*-linux-gnuabi64' and 
	`mips64*-*-linux-gnuabi64' targets.
	* testsuite/ld-undefined/undefined.exp: Handle 
	`mips64*-*-*-gnuabi64' targets.
	* testsuite/ld-mips-elf/attr-gnu-4-10.d: Likewise.
	* testsuite/ld-mips-elf/compact-eh6.d: Likewise.
	* testsuite/ld-mips-elf/mips-elf.exp: Handle `*-*-*-gnuabi64' 
	targets.
---
 bfd/config.bfd                                     |   10 ++++++++++
 binutils/testsuite/binutils-all/mips/mips.exp      |   18 ++++++++++++++----
 binutils/testsuite/binutils-all/objcopy.exp        |    3 ++-
 binutils/testsuite/binutils-all/remove-relocs-01.d |    2 +-
 binutils/testsuite/binutils-all/remove-relocs-04.d |    2 +-
 binutils/testsuite/binutils-all/remove-relocs-05.d |    2 +-
 binutils/testsuite/binutils-all/remove-relocs-06.d |    2 +-
 gas/configure                                      |    6 +++---
 gas/configure.ac                                   |    6 +++---
 gas/testsuite/gas/mips/compact-eh-eb-7.d           |    2 +-
 gas/testsuite/gas/mips/compact-eh-el-7.d           |    2 +-
 ld/configure.tgt                                   |   10 ++++++++++
 ld/testsuite/ld-mips-elf/attr-gnu-4-10.d           |    2 +-
 ld/testsuite/ld-mips-elf/compact-eh6.d             |    2 +-
 ld/testsuite/ld-mips-elf/mips-elf.exp              |   21 ++++++++++++++++-----
 ld/testsuite/ld-undefined/undefined.exp            |    3 ++-
 16 files changed, 68 insertions(+), 25 deletions(-)

binutils-yunqiang-mips-linux-gnuabi64.diff
Index: binutils-gdb/bfd/config.bfd
===================================================================
--- binutils-gdb.orig/bfd/config.bfd
+++ binutils-gdb/bfd/config.bfd
@@ -941,10 +941,20 @@ case "${targ}" in
     targ_defvec=mips_elf32_be_vec
     targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
     ;;
+  mips64*el-*-linux*-gnuabi64)
+    targ_defvec=mips_elf64_trad_le_vec
+    targ_selvecs="mips_elf64_trad_be_vec mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec"
+    want64=true
+    ;;
   mips64*el-*-linux*)
     targ_defvec=mips_elf32_ntrad_le_vec
     targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec"
     ;;
+  mips64*-*-linux*-gnuabi64)
+    targ_defvec=mips_elf64_trad_be_vec
+    targ_selvecs="mips_elf64_trad_le_vec mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec"
+    want64=true
+    ;;
   mips64*-*-linux*)
     targ_defvec=mips_elf32_ntrad_be_vec
     targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
Index: binutils-gdb/binutils/testsuite/binutils-all/mips/mips.exp
===================================================================
--- binutils-gdb.orig/binutils/testsuite/binutils-all/mips/mips.exp
+++ binutils-gdb/binutils/testsuite/binutils-all/mips/mips.exp
@@ -125,13 +125,23 @@ if {[istarget *-*-openbsd*] } {
     if [istarget *el-*-*] {
 	set abi_asflags(o32) -32
 	set abi_ldflags(o32) -melf32ltsmip
-	set abi_asflags(n64) "-march=from-abi -64"
-	set abi_ldflags(n64) -melf64ltsmip
+	if [istarget *-*-*-gnuabi64] {
+	    set abi_asflags(n32) "-march=from-abi -n32"
+	    set abi_ldflags(n32) -melf32ltsmipn32
+	} else {
+	    set abi_asflags(n64) "-march=from-abi -64"
+	    set abi_ldflags(n64) -melf64ltsmip
+	}
     } else {
 	set abi_asflags(o32) -32
 	set abi_ldflags(o32) -melf32btsmip
-	set abi_asflags(n64) "-march=from-abi -64"
-	set abi_ldflags(n64) -melf64btsmip
+	if [istarget *-*-*-gnuabi64] {
+	    set abi_asflags(n32) "-march=from-abi -n32"
+	    set abi_ldflags(n32) -melf32btsmipn32
+	} else {
+	    set abi_asflags(n64) "-march=from-abi -64"
+	    set abi_ldflags(n64) -melf64btsmip
+	}
     }
     set irixemul 0
 } elseif {[istarget *-*-linux*] } {
Index: binutils-gdb/binutils/testsuite/binutils-all/objcopy.exp
===================================================================
--- binutils-gdb.orig/binutils/testsuite/binutils-all/objcopy.exp
+++ binutils-gdb/binutils/testsuite/binutils-all/objcopy.exp
@@ -1269,7 +1269,8 @@ if [is_elf_format] {
     run_dump_test "strip-9"
     run_dump_test "strip-12"
 
-    if { [istarget "mips64*-*-openbsd*"] } {
+    if { [istarget "mips64*-*-openbsd*"] \
+	 || [istarget "mips64*-*-*-gnuabi64"] } {
 	set reloc_format mips64
     }
     # A relocation type not supported by any target
Index: binutils-gdb/binutils/testsuite/binutils-all/remove-relocs-01.d
===================================================================
--- binutils-gdb.orig/binutils/testsuite/binutils-all/remove-relocs-01.d
+++ binutils-gdb/binutils/testsuite/binutils-all/remove-relocs-01.d
@@ -2,7 +2,7 @@
 #source: remove-relocs-01.s
 #objcopy: --remove-relocations=.data.relocs.01
 #readelf: -r
-#notarget: "mips64*-*-openbsd*"
+#notarget: mips64*-*-openbsd* mips64*-*-*-gnuabi64
 
 Relocation section '\.rela?\.data\.relocs\.02' at offset 0x[0-9a-f]+ contains 3 entries:
 .*
Index: binutils-gdb/binutils/testsuite/binutils-all/remove-relocs-04.d
===================================================================
--- binutils-gdb.orig/binutils/testsuite/binutils-all/remove-relocs-04.d
+++ binutils-gdb/binutils/testsuite/binutils-all/remove-relocs-04.d
@@ -2,7 +2,7 @@
 #source: remove-relocs-01.s
 #objcopy: --remove-relocations=.data.relocs.0\[12\]
 #readelf: -r
-#notarget: "mips64*-*-openbsd*"
+#notarget: mips64*-*-openbsd* mips64*-*-*-gnuabi64
 
 Relocation section '\.rela?\.data\.relocs\.03' at offset 0x[0-9a-f]+ contains 3 entries:
 .*
Index: binutils-gdb/binutils/testsuite/binutils-all/remove-relocs-05.d
===================================================================
--- binutils-gdb.orig/binutils/testsuite/binutils-all/remove-relocs-05.d
+++ binutils-gdb/binutils/testsuite/binutils-all/remove-relocs-05.d
@@ -2,7 +2,7 @@
 #source: remove-relocs-01.s
 #objcopy: --remove-section=.rela.data.relocs.01 --remove-section=.rel.data.relocs.01
 #readelf: -r
-#notarget: "mips64*-*-openbsd*"
+#notarget: mips64*-*-openbsd* mips64*-*-*-gnuabi64
 
 Relocation section '\.rela?\.data\.relocs\.02' at offset 0x[0-9a-f]+ contains 3 entries:
 .*
Index: binutils-gdb/binutils/testsuite/binutils-all/remove-relocs-06.d
===================================================================
--- binutils-gdb.orig/binutils/testsuite/binutils-all/remove-relocs-06.d
+++ binutils-gdb/binutils/testsuite/binutils-all/remove-relocs-06.d
@@ -2,7 +2,7 @@
 #source: remove-relocs-01.s
 #objcopy: --remove-relocations=.data.relocs.* --remove-relocations=!.data.relocs.02
 #readelf: -r
-#notarget: "mips64*-*-openbsd*"
+#notarget: mips64*-*-openbsd* mips64*-*-*-gnuabi64
 
 Relocation section '\.rela?\.data\.relocs\.02' at offset 0x[0-9a-f]+ contains 3 entries:
 .*
Index: binutils-gdb/gas/configure
===================================================================
--- binutils-gdb.orig/gas/configure
+++ binutils-gdb/gas/configure
@@ -12225,6 +12225,9 @@ _ACEOF
 	esac
 	# Decide which ABI to target by default.
 	case ${target} in
+	  mips64*-openbsd* | mips64*-linux-gnuabi64)
+	    mips_default_abi=N64_ABI
+	    ;;
 	  mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* \
 	  | mips64*-kfreebsd*-gnu | mips64*-ps2-elf*)
 	    mips_default_abi=N32_ABI
@@ -12232,9 +12235,6 @@ _ACEOF
 	  mips*-linux* | mips*-freebsd* | mips*-kfreebsd*-gnu)
 	    mips_default_abi=O32_ABI
 	    ;;
-	  mips64*-openbsd*)
-	    mips_default_abi=N64_ABI
-	    ;;
 	  *)
 	    mips_default_abi=NO_ABI
 	    ;;
Index: binutils-gdb/gas/configure.ac
===================================================================
--- binutils-gdb.orig/gas/configure.ac
+++ binutils-gdb/gas/configure.ac
@@ -394,6 +394,9 @@ changequote([,])dnl
 	esac
 	# Decide which ABI to target by default.
 	case ${target} in
+	  mips64*-openbsd* | mips64*-linux-gnuabi64)
+	    mips_default_abi=N64_ABI
+	    ;;
 	  mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* \
 	  | mips64*-kfreebsd*-gnu | mips64*-ps2-elf*)
 	    mips_default_abi=N32_ABI
@@ -401,9 +404,6 @@ changequote([,])dnl
 	  mips*-linux* | mips*-freebsd* | mips*-kfreebsd*-gnu)
 	    mips_default_abi=O32_ABI
 	    ;;
-	  mips64*-openbsd*)
-	    mips_default_abi=N64_ABI
-	    ;;
 	  *)
 	    mips_default_abi=NO_ABI
 	    ;;
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-7.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-eb-7.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-eb-7.d
@@ -2,7 +2,7 @@
 #name: Compact EH EB #7 with personality id and fallback FDE
 #source: compact-eh-7.s
 #as: -EB -mno-pdr
-#notarget: mips64*-*-openbsd*
+#notarget: mips64*-*-openbsd* mips64*-*-*-gnuabi64
 
 .*:     file format.*
 
Index: binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-7.d
===================================================================
--- binutils-gdb.orig/gas/testsuite/gas/mips/compact-eh-el-7.d
+++ binutils-gdb/gas/testsuite/gas/mips/compact-eh-el-7.d
@@ -2,7 +2,7 @@
 #name: Compact EH EL #7 with personality id and fallback FDE
 #source: compact-eh-7.s
 #as: -EL -mno-pdr
-#notarget: mips64*-*-openbsd*
+#notarget: mips64*-*-openbsd* mips64*-*-*-gnuabi64
 
 .*:     file format.*
 
Index: binutils-gdb/ld/configure.tgt
===================================================================
--- binutils-gdb.orig/ld/configure.tgt
+++ binutils-gdb/ld/configure.tgt
@@ -580,10 +580,20 @@ mips*-*-vxworks*)	targ_emul=elf32ebmipvx
 			;;
 mips*-*-windiss)	targ_emul=elf32mipswindiss
 			;;
+mips64*el-*-linux-gnuabi64)
+			targ_emul=elf64ltsmip
+			targ_extra_emuls="elf64btsmip elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip"
+			targ_extra_libpath=$targ_extra_emuls
+			;;
 mips64*el-*-linux-*)	targ_emul=elf32ltsmipn32
 			targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
 			targ_extra_libpath=$targ_extra_emuls
 			;;
+mips64*-*-linux-gnuabi64)
+			targ_emul=elf64btsmip
+			targ_extra_emuls="elf64ltsmip elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip"
+			targ_extra_libpath=$targ_extra_emuls
+			;;
 mips64*-*-linux-*)	targ_emul=elf32btsmipn32
 			targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
 			targ_extra_libpath=$targ_extra_emuls
Index: binutils-gdb/ld/testsuite/ld-mips-elf/attr-gnu-4-10.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/attr-gnu-4-10.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/attr-gnu-4-10.d
@@ -3,7 +3,7 @@
 #as: -mpdr
 #ld: -r
 #readelf: -hA
-#notarget: mips64*-*-openbsd*
+#notarget: mips64*-*-openbsd* mips64*-*-*-gnuabi64
 
 ELF Header:
   Magic:   .*
Index: binutils-gdb/ld/testsuite/ld-mips-elf/compact-eh6.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/compact-eh6.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/compact-eh6.d
@@ -4,7 +4,7 @@
 #as: -EB
 #readelf: -x .eh_frame_hdr
 #ld: -EB -e main
-#
+#notarget: mips64*-*-*-gnuabi64
 
 Hex dump of section \'\.eh_frame_hdr\':
 
Index: binutils-gdb/ld/testsuite/ld-mips-elf/mips-elf.exp
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ binutils-gdb/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -155,13 +155,23 @@ if {[istarget *-*-openbsd*] } {
     if [istarget *el-*-*] {
 	set abi_asflags(o32) -32
 	set abi_ldflags(o32) -melf32ltsmip
-	set abi_asflags(n64) "-march=from-abi -64"
-	set abi_ldflags(n64) -melf64ltsmip
+	if [istarget *-*-*-gnuabi64] {
+	    set abi_asflags(n32) "-march=from-abi -n32"
+	    set abi_ldflags(n32) -melf32ltsmipn32
+	} else {
+	    set abi_asflags(n64) "-march=from-abi -64"
+	    set abi_ldflags(n64) -melf64ltsmip
+	}
     } else {
 	set abi_asflags(o32) -32
 	set abi_ldflags(o32) -melf32btsmip
-	set abi_asflags(n64) "-march=from-abi -64"
-	set abi_ldflags(n64) -melf64btsmip
+	if [istarget *-*-*-gnuabi64] {
+	    set abi_asflags(n32) "-march=from-abi -n32"
+	    set abi_ldflags(n32) -melf32btsmipn32
+	} else {
+	    set abi_asflags(n64) "-march=from-abi -64"
+	    set abi_ldflags(n64) -melf64btsmip
+	}
     }
     set irixemul 0
 } elseif {[istarget *-*-linux*] } {
@@ -811,7 +821,8 @@ if { $linux_gnu } {
     run_dump_test "got-page-1"
     run_dump_test_n32 "got-page-2"
     run_dump_test_n64 "dyn-sec64" noarch
-    run_dump_test "got-page-3"
+    run_dump_test_o32 "got-page-3"
+    run_dump_test_n32 "got-page-3" [list [list name (n32)]]
     if $has_abi(o32) {
 	run_ld_link_tests [subst {
 	    {"GOT page 4 (one file)"
Index: binutils-gdb/ld/testsuite/ld-undefined/undefined.exp
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-undefined/undefined.exp
+++ binutils-gdb/ld/testsuite/ld-undefined/undefined.exp
@@ -206,7 +206,8 @@ if { ![is_elf_format] || ![check_shared_
     # triplets, and S+core targets using an extra R_SCORE_NONE
     # relocation, so adjust for that.
     switch -glob $target_triplet {
-	"mips64*-*-openbsd*" {
+	"mips64*-*-openbsd*" -
+	"mips64*-*-*-gnuabi64" {
 	    set none_count 6
 	    set reloc_count 4
 	}

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

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

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-28  5:06 [committed 00/16] MIPS: Revert the change of `mipsisa64*-*-linux*' semantics Maciej W. Rozycki
2023-07-28  5:06 ` [committed 01/16] Revert "MIPS: support mips*64 as CPU and gnuabi64 as ABI" Maciej W. Rozycki
2023-07-28  5:06 ` [committed 02/16] MIPS/LD: Include n64 `.interp' with INITIAL_READONLY_SECTIONS Maciej W. Rozycki
2023-07-28  5:06 ` [committed 03/16] MIPS/GAS/testsuite: Disable compact EH #7 tests with OpenBSD targets Maciej W. Rozycki
2023-07-28  5:06 ` [committed 04/16] MIPS/LD/testsuite: Fix unaligned JALX failures " Maciej W. Rozycki
2023-07-28  5:06 ` [committed 05/16] MIPS/LD/testsuite: Fix JALR relaxation test failure with IRIX 6 Maciej W. Rozycki
2023-07-28  5:06 ` [committed 06/16] MIPS/LD/testsuite: Fix `attr-gnu-4-10' failures with IRIX targets Maciej W. Rozycki
2023-07-28  5:07 ` [committed 07/16] MIPS/LD/testsuite: Fix `attr-gnu-4-10' failures with OpenBSD targets Maciej W. Rozycki
2023-07-28  5:07 ` [committed 08/16] MIPS/LD/testsuite: Run `got-dump-1' for o32/n32 ABIs Maciej W. Rozycki
2023-07-28  5:07 ` [committed 09/16] MIPS/GAS/testsuite: Force o32 for tests expecting 32-bit addressing Maciej W. Rozycki
2023-07-28  5:07 ` [committed 10/16] MIPS/LD/testsuite: Fix MIPS16 interlinking test n64 regressions Maciej W. Rozycki
2023-07-28  5:07 ` [committed 11/16] MIPS/LD/testsuite: Fix MIPS16 interlinking test IRIX 6 regressions Maciej W. Rozycki
2023-07-28  5:07 ` [committed 12/16] testsuite: Also discard the `.MIPS.options' section Maciej W. Rozycki
2023-07-28  5:07 ` [committed 13/16] MIPS/testsuite: Handle 64-bit addresses Maciej W. Rozycki
2023-07-28  5:07 ` [committed 14/16] testsuite: Handle composed R_MIPS_NONE relocations Maciej W. Rozycki
2023-07-28  5:07 ` [committed 15/16] MIPS/GAS/testsuite: Fix n64 compact EH failures Maciej W. Rozycki
2023-07-28  5:07 ` [committed 16/16] MIPS: Support `-gnuabi64' target triplet suffix for 64-bit Linux 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).