From 16503da059d2596e173bba899d42afa188250103 Mon Sep 17 00:00:00 2001
From: Matthew Fortune <matthew.fortune@imgtec.com>
Date: Tue, 2 Sep 2014 08:25:23 +0100
Subject: [PATCH] MIPS testsuite cleanup following O32 FPXX work

binutils/testsuite/

	* binutils-all/readelf.ss-mips: Update expected output.

gas/testsuite/

	* gas/elf/type.e: Update expected output.
	* gas/mips/attr-gnu-abi-fp-1.d: Relax expected output.
	* gas/mips/elf_ase_micromips-2.d: Likewise.
	* gas/mips/elf_ase_micromips.d: Likewise.
	* gas/mips/elf_ase_mips16-2.d: Likewise.
	* gas/mips/elf_ase_mips16.d: Likewise.
	* gas/mips/mips16-e.d: Likewise.
	* gas/mips/mips16-f.d: Likewise.
	* gas/mips/mipsel16-e.d: Likewise.
	* gas/mips/mipsel16-f.d: Likewise.
	* gas/mips/module-defer-warn2.l: Likewise.
	* gas/mips/module-mfp32.d: Likewise.
	* gas/mips/module-msingle-float.d: Likewise.
	* gas/mips/module-msoft-float.d: Likewise.
	* gas/mips/tmips16-e.d: Likewise.
	* gas/mips/tmips16-f.d: Likewise.
	* gas/mips/tmipsel16-e.d: Likewise.
	* gas/mips/tmipsel16-f.d: Likewise.
	* gas/mips/mips.exp: Add mipsisa32 and mipsisa32el to
	the list of addr32 targets.

ld/testsuite/

	* ld-mips-elf/abiflags-strip1-ph.d: Relax expected output and options.
	* ld-mips-elf/abiflags-strip2-ph.d: Likewise.
	* ld-mips-elf/abiflags-strip3-ph.d: Likewise.
	* ld-mips-elf/abiflags-strip4-ph.d: Likewise.
	* ld-mips-elf/abiflags-strip5-ph.d: Likewise.
	* ld-mips-elf/abiflags-strip6-ph.d: Likewise.
	* ld-mips-elf/abiflags-strip7-ph.d: Likewise.
	* ld-mips-elf/abiflags-strip8-ph.d: Likewise.
	* ld-mips-elf/abiflags-strip9-ph.d: Likewise.
	* ld-mips-elf/attr-gnu-4-0-n32-ph.d: Likewise.
	* ld-mips-elf/attr-gnu-4-0-ph.d: Likewise.
	* ld-mips-elf/attr-gnu-4-05.d: Likewise.
	* ld-mips-elf/attr-gnu-4-06.d: Likewise.
	* ld-mips-elf/attr-gnu-4-07.d: Likewise.
	* ld-mips-elf/attr-gnu-4-1-ph.d: Likewise.
	* ld-mips-elf/attr-gnu-4-10.d: Likewise.
	* ld-mips-elf/attr-gnu-4-15.d: Likewise.
	* ld-mips-elf/attr-gnu-4-16.d: Likewise.
	* ld-mips-elf/attr-gnu-4-17.d: Likewise.
	* ld-mips-elf/attr-gnu-4-2-ph.d: Likewise.
	* ld-mips-elf/attr-gnu-4-25.d: Likewise.
	* ld-mips-elf/attr-gnu-4-26.d: Likewise.
	* ld-mips-elf/attr-gnu-4-27.d: Likewise.
	* ld-mips-elf/attr-gnu-4-3-ph.d: Likewise.
	* ld-mips-elf/attr-gnu-4-35.d: Likewise.
	* ld-mips-elf/attr-gnu-4-36.d: Likewise.
	* ld-mips-elf/attr-gnu-4-37.d: Likewise.
	* ld-mips-elf/attr-gnu-4-4-ph.d: Likewise.
	* ld-mips-elf/attr-gnu-4-45.d: Likewise.
	* ld-mips-elf/attr-gnu-4-46.d: Likewise.
	* ld-mips-elf/attr-gnu-4-47.d: Likewise.
	* ld-mips-elf/attr-gnu-4-5-ph.d: Likewise.
	* ld-mips-elf/attr-gnu-4-50.d: Likewise.
	* ld-mips-elf/attr-gnu-4-51.d: Likewise.
	* ld-mips-elf/attr-gnu-4-52.d: Likewise.
	* ld-mips-elf/attr-gnu-4-53.d: Likewise.
	* ld-mips-elf/attr-gnu-4-54.d: Likewise.
	* ld-mips-elf/attr-gnu-4-55.d: Likewise.
	* ld-mips-elf/attr-gnu-4-56.d: Likewise.
	* ld-mips-elf/attr-gnu-4-57.d: Likewise.
	* ld-mips-elf/attr-gnu-4-58.d: Likewise.
	* ld-mips-elf/attr-gnu-4-6-ph.d: Likewise.
	* ld-mips-elf/attr-gnu-4-60.d: Likewise.
	* ld-mips-elf/attr-gnu-4-61.d: Likewise.
	* ld-mips-elf/attr-gnu-4-62.d: Likewise.
	* ld-mips-elf/attr-gnu-4-63.d: Likewise.
	* ld-mips-elf/attr-gnu-4-64.d: Likewise.
	* ld-mips-elf/attr-gnu-4-65.d: Likewise.
	* ld-mips-elf/attr-gnu-4-66.d: Likewise.
	* ld-mips-elf/attr-gnu-4-67.d: Likewise.
	* ld-mips-elf/attr-gnu-4-68.d: Likewise.
	* ld-mips-elf/attr-gnu-4-7-ph.d: Likewise.
	* ld-mips-elf/attr-gnu-4-70.d: Likewise.
	* ld-mips-elf/attr-gnu-4-71.d: Likewise.
	* ld-mips-elf/attr-gnu-4-72.d: Likewise.
	* ld-mips-elf/attr-gnu-4-73.d: Likewise.
	* ld-mips-elf/attr-gnu-4-74.d: Likewise.
	* ld-mips-elf/attr-gnu-4-75.d: Likewise.
	* ld-mips-elf/attr-gnu-4-76.d: Likewise.
	* ld-mips-elf/attr-gnu-4-77.d: Likewise.
	* ld-mips-elf/attr-gnu-4-78.d: Likewise.
	* ld-mips-elf/mips-elf.exp: Update default abi_asflags(o32) to explicitly
	pass -32 for the 'no abi' configurations.  Modify the way attr-gnu* tests
	are run to make them pass on all configurations.
---
 binutils/testsuite/binutils-all/readelf.ss-mips | 18 ++++---
 gas/testsuite/gas/elf/type.e                    | 14 ++---
 gas/testsuite/gas/mips/attr-gnu-abi-fp-1.d      |  6 +--
 gas/testsuite/gas/mips/elf_ase_micromips-2.d    |  4 +-
 gas/testsuite/gas/mips/elf_ase_micromips.d      |  4 +-
 gas/testsuite/gas/mips/elf_ase_mips16-2.d       |  4 +-
 gas/testsuite/gas/mips/elf_ase_mips16.d         |  4 +-
 gas/testsuite/gas/mips/mips.exp                 |  3 +-
 gas/testsuite/gas/mips/mips16-e.d               |  7 +++
 gas/testsuite/gas/mips/mips16-f.d               |  7 +++
 gas/testsuite/gas/mips/mipsel16-e.d             |  7 +++
 gas/testsuite/gas/mips/mipsel16-f.d             |  7 +++
 gas/testsuite/gas/mips/module-defer-warn2.l     |  4 +-
 gas/testsuite/gas/mips/module-mfp32.d           |  6 +--
 gas/testsuite/gas/mips/module-msingle-float.d   |  6 +--
 gas/testsuite/gas/mips/module-msoft-float.d     |  6 +--
 gas/testsuite/gas/mips/tmips16-e.d              |  4 +-
 gas/testsuite/gas/mips/tmips16-f.d              |  4 +-
 gas/testsuite/gas/mips/tmipsel16-e.d            |  4 +-
 gas/testsuite/gas/mips/tmipsel16-f.d            |  4 +-
 ld/testsuite/ld-mips-elf/abiflags-strip1-ph.d   |  6 +--
 ld/testsuite/ld-mips-elf/abiflags-strip2-ph.d   | 12 ++---
 ld/testsuite/ld-mips-elf/abiflags-strip3-ph.d   | 12 ++---
 ld/testsuite/ld-mips-elf/abiflags-strip4-ph.d   | 16 +++---
 ld/testsuite/ld-mips-elf/abiflags-strip5-ph.d   | 16 +++---
 ld/testsuite/ld-mips-elf/abiflags-strip6-ph.d   | 12 ++---
 ld/testsuite/ld-mips-elf/abiflags-strip7-ph.d   | 12 ++---
 ld/testsuite/ld-mips-elf/abiflags-strip8-ph.d   | 12 ++---
 ld/testsuite/ld-mips-elf/abiflags-strip9-ph.d   | 12 ++---
 ld/testsuite/ld-mips-elf/attr-gnu-4-0-n32-ph.d  |  2 +-
 ld/testsuite/ld-mips-elf/attr-gnu-4-0-ph.d      | 10 ++--
 ld/testsuite/ld-mips-elf/attr-gnu-4-05.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-06.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-07.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-1-ph.d      | 10 ++--
 ld/testsuite/ld-mips-elf/attr-gnu-4-10.d        | 10 ++--
 ld/testsuite/ld-mips-elf/attr-gnu-4-15.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-16.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-17.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-2-ph.d      | 10 ++--
 ld/testsuite/ld-mips-elf/attr-gnu-4-25.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-26.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-27.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-3-ph.d      | 10 ++--
 ld/testsuite/ld-mips-elf/attr-gnu-4-35.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-36.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-37.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-4-ph.d      | 10 ++--
 ld/testsuite/ld-mips-elf/attr-gnu-4-45.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-46.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-47.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-5-ph.d      | 10 ++--
 ld/testsuite/ld-mips-elf/attr-gnu-4-50.d        | 10 ++--
 ld/testsuite/ld-mips-elf/attr-gnu-4-51.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-52.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-53.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-54.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-55.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-56.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-57.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-58.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-6-ph.d      | 10 ++--
 ld/testsuite/ld-mips-elf/attr-gnu-4-60.d        | 10 ++--
 ld/testsuite/ld-mips-elf/attr-gnu-4-61.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-62.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-63.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-64.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-65.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-66.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-67.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-68.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-7-ph.d      | 10 ++--
 ld/testsuite/ld-mips-elf/attr-gnu-4-70.d        | 10 ++--
 ld/testsuite/ld-mips-elf/attr-gnu-4-71.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-72.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-73.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-74.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-75.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-76.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-77.d        |  6 +--
 ld/testsuite/ld-mips-elf/attr-gnu-4-78.d        |  6 +--
 ld/testsuite/ld-mips-elf/mips-elf.exp           | 72 +++++++++++++++----------
 82 files changed, 338 insertions(+), 323 deletions(-)

diff --git a/binutils/testsuite/binutils-all/readelf.ss-mips b/binutils/testsuite/binutils-all/readelf.ss-mips
index fd97552..01d3df1 100644
--- a/binutils/testsuite/binutils-all/readelf.ss-mips
+++ b/binutils/testsuite/binutils-all/readelf.ss-mips
@@ -1,15 +1,17 @@
 
-Symbol table '.symtab' contains 12 entries:
+Symbol table '.symtab' contains 14 entries:
  +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
  +0: 00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND 
  +1: 00000000 +0 +SECTION +LOCAL +DEFAULT +. (|\.text)
  +2: 00000000 +0 +SECTION +LOCAL +DEFAULT +. (|\.data)
  +3: 00000000 +0 +SECTION +LOCAL +DEFAULT +. (|\.bss)
  +4: 00000000 +0 +SECTION +LOCAL +DEFAULT +. (|\.reginfo)
- +5: 00000000 +0 +SECTION +LOCAL +DEFAULT +. (|\.pdr)
- +6: 00000000 +0 +OBJECT +GLOBAL +DEFAULT +. text_symbol
- +7: 00000000 +0 +NOTYPE +LOCAL +DEFAULT +. static_text_symbol
- +8: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND external_symbol
- +9: 00000000 +0 +OBJECT +GLOBAL +DEFAULT +. data_symbol
- +10: 00000000 +0 +NOTYPE +LOCAL +DEFAULT +. static_data_symbol
- +11: 00000004 +4 +(COMMON|OBJECT) +GLOBAL +DEFAULT +(PRC|COM) common_symbol
+ +5: 00000000 +0 +SECTION +LOCAL +DEFAULT +. (|\.MIPS\.abiflags)
+ +6: 00000000 +0 +SECTION +LOCAL +DEFAULT +. (|\.pdr)
+ +7: 00000000 +0 +SECTION +LOCAL +DEFAULT +. (|\.gnu\.attributes)
+ +8: 00000000 +0 +OBJECT +GLOBAL +DEFAULT +. text_symbol
+ +9: 00000000 +0 +NOTYPE +LOCAL +DEFAULT +. static_text_symbol
+ +10: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND external_symbol
+ +11: 00000000 +0 +OBJECT +GLOBAL +DEFAULT +. data_symbol
+ +12: 00000000 +0 +NOTYPE +LOCAL +DEFAULT +. static_data_symbol
+ +13: 00000004 +4 +(COMMON|OBJECT) +GLOBAL +DEFAULT +(PRC|COM) common_symbol
diff --git a/gas/testsuite/gas/elf/type.e b/gas/testsuite/gas/elf/type.e
index fbc9aac..a1159bf 100644
--- a/gas/testsuite/gas/elf/type.e
+++ b/gas/testsuite/gas/elf/type.e
@@ -1,7 +1,7 @@
- +.: 0+0 +1 +FUNC +LOCAL +DEFAULT +. function
- +.: 0+1 +1 +IFUNC +LOCAL +DEFAULT +. indirect_function
- +.: 0+0 +1 +OBJECT +LOCAL +DEFAULT +. object
- +.: 0+1 +1 +TLS +LOCAL +DEFAULT +. tls_object
- +..: 0+2 +1 +NOTYPE +LOCAL +DEFAULT +. notype
- +..: 0+3 +1 +OBJECT +UNIQUE +DEFAULT +. unique_global
- +..: 0+1 +1 +(COMMON|OBJECT) +GLOBAL +DEFAULT +COM common
+ +.+: 0+0 +1 +FUNC +LOCAL +DEFAULT +. function
+ +.+: 0+1 +1 +IFUNC +LOCAL +DEFAULT +. indirect_function
+ +.+: 0+0 +1 +OBJECT +LOCAL +DEFAULT +. object
+ +.+: 0+1 +1 +TLS +LOCAL +DEFAULT +. tls_object
+ +.+: 0+2 +1 +NOTYPE +LOCAL +DEFAULT +. notype
+ +.+: 0+3 +1 +OBJECT +UNIQUE +DEFAULT +. unique_global
+ +.+: 0+1 +1 +(COMMON|OBJECT) +GLOBAL +DEFAULT +COM common
diff --git a/gas/testsuite/gas/mips/attr-gnu-abi-fp-1.d b/gas/testsuite/gas/mips/attr-gnu-abi-fp-1.d
index ce5bbc2..17218d3 100644
--- a/gas/testsuite/gas/mips/attr-gnu-abi-fp-1.d
+++ b/gas/testsuite/gas/mips/attr-gnu-abi-fp-1.d
@@ -9,14 +9,14 @@ File Attributes
 
 MIPS ABI Flags Version: 0
 
-ISA: MIPS1
+ISA: MIPS.*
 GPR size: 32
 CPR1 size: 32
 CPR2 size: 0
 FP ABI: Hard float \(double precision\)
-ISA Extension: None
+ISA Extension: .*
 ASEs:
 	None
-FLAGS 1: 00000000
+FLAGS 1: 0000000.
 FLAGS 2: 00000000
 
diff --git a/gas/testsuite/gas/mips/elf_ase_micromips-2.d b/gas/testsuite/gas/mips/elf_ase_micromips-2.d
index e600880..0eab856 100644
--- a/gas/testsuite/gas/mips/elf_ase_micromips-2.d
+++ b/gas/testsuite/gas/mips/elf_ase_micromips-2.d
@@ -13,9 +13,9 @@ GPR size: 32
 CPR1 size: 32
 CPR2 size: 0
 FP ABI: Hard float \(double precision\)
-ISA Extension: None
+ISA Extension: .*
 ASEs:
 	MICROMIPS ASE
-FLAGS 1: 00000000
+FLAGS 1: 0000000.
 FLAGS 2: 00000000
 
diff --git a/gas/testsuite/gas/mips/elf_ase_micromips.d b/gas/testsuite/gas/mips/elf_ase_micromips.d
index 13bb65a..507e270 100644
--- a/gas/testsuite/gas/mips/elf_ase_micromips.d
+++ b/gas/testsuite/gas/mips/elf_ase_micromips.d
@@ -13,9 +13,9 @@ GPR size: 32
 CPR1 size: 32
 CPR2 size: 0
 FP ABI: Hard float \(double precision\)
-ISA Extension: None
+ISA Extension: .*
 ASEs:
 	None
-FLAGS 1: 00000000
+FLAGS 1: 0000000.
 FLAGS 2: 00000000
 
diff --git a/gas/testsuite/gas/mips/elf_ase_mips16-2.d b/gas/testsuite/gas/mips/elf_ase_mips16-2.d
index afd923c..d19a07d 100644
--- a/gas/testsuite/gas/mips/elf_ase_mips16-2.d
+++ b/gas/testsuite/gas/mips/elf_ase_mips16-2.d
@@ -13,9 +13,9 @@ GPR size: 32
 CPR1 size: 32
 CPR2 size: 0
 FP ABI: Hard float \(double precision\)
-ISA Extension: None
+ISA Extension: .*
 ASEs:
 	MIPS16 ASE
-FLAGS 1: 00000000
+FLAGS 1: 0000000.
 FLAGS 2: 00000000
 
diff --git a/gas/testsuite/gas/mips/elf_ase_mips16.d b/gas/testsuite/gas/mips/elf_ase_mips16.d
index 27135f1..20e0d8a 100644
--- a/gas/testsuite/gas/mips/elf_ase_mips16.d
+++ b/gas/testsuite/gas/mips/elf_ase_mips16.d
@@ -13,9 +13,9 @@ GPR size: 32
 CPR1 size: 32
 CPR2 size: 0
 FP ABI: Hard float \(double precision\)
-ISA Extension: None
+ISA Extension: .*
 ASEs:
 	None
-FLAGS 1: 00000000
+FLAGS 1: 0000000.
 FLAGS 2: 00000000
 
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index 15197e4..8f36918 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -484,7 +484,8 @@ if { [istarget mips*-*-vxworks*] } {
     run_dump_test "vxworks1-el"
     run_dump_test "vxworks1-xgot-el"
 } elseif { [istarget mips*-*-*] } {
-    set addr32 [expr [istarget mipstx39*-*-*] || [istarget mips-*-linux*] || [istarget mipsel-*-linux*]]
+    set addr32 [expr [istarget mipstx39*-*-*] || [istarget mips-*-linux*] || [istarget mipsel-*-linux*] \
+		     || [istarget mipsisa32-*-linux*] || [istarget mipsisa32el-*-linux*]]
     set has_newabi [expr [istarget *-*-irix6*] || [istarget mips*-*-linux*] \
                          || [istarget mips*-sde-elf*] || [istarget mips*-mti-elf*]]
 
diff --git a/gas/testsuite/gas/mips/mips16-e.d b/gas/testsuite/gas/mips/mips16-e.d
index 15e5587d..09b193c 100644
--- a/gas/testsuite/gas/mips/mips16-e.d
+++ b/gas/testsuite/gas/mips/mips16-e.d
@@ -12,7 +12,9 @@ SYMBOL TABLE:
 0+0000000 l    d  \.bss	0+0000000 (|\.bss)
 0+0000000 l    d  foo	0+0000000 (|foo)
 0+0000000 l    d  \.reginfo	0+0000000 (|\.reginfo)
+0+0000000 l    d  \.MIPS\.abiflags	0+0000000 (|\.MIPS\.abiflags)
 0+0000000 l    d  \.(mdebug|pdr)	0+0000000 (|\.mdebug|\.pdr)
+0+0000000 l    d  \.gnu\.attributes	0+0000000 (|\.gnu\.attributes)
 0+0000002 l       \.text	0+0000000 0xf0 l1
 0+0000004 l       \.text	0+0000000 0xf0 \.L1.1
 0+0000000         \*UND\*	0+0000000 g1
@@ -33,6 +35,11 @@ Contents of section \.text:
 Contents of section \.reginfo:
  0000 00010000 00000000 00000000 00000000  .*
  0010 00000000 00000000                    .*
+Contents of section \.MIPS\.abiflags:
+ .*
+ .*
 Contents of section foo:
  0000 00000000 00000008 00000000 00000003  .*
  0010 00000000 00000008 00000000 00000000  .*
+Contents of section \.gnu\.attributes:
+ .*
diff --git a/gas/testsuite/gas/mips/mips16-f.d b/gas/testsuite/gas/mips/mips16-f.d
index 9a2ce3b..6ca5bb9 100644
--- a/gas/testsuite/gas/mips/mips16-f.d
+++ b/gas/testsuite/gas/mips/mips16-f.d
@@ -12,7 +12,9 @@ SYMBOL TABLE:
 0+0000000 l    d  \.bss	0+0000000 (|\.bss)
 0+0000000 l    d  foo	0+0000000 (|foo)
 0+0000000 l    d  \.reginfo	0+0000000 (|\.reginfo)
+0+0000000 l    d  \.MIPS\.abiflags	0+0000000 (|\.MIPS\.abiflags)
 0+0000000 l    d  \.(mdebug|pdr)	0+0000000 (|\.mdebug|\.pdr)
+0+0000000 l    d  \.gnu\.attributes	0+0000000 (|\.gnu\.attributes)
 0+0000002 l       \.text	0+0000000 0xf0 l1
 
 
@@ -26,5 +28,10 @@ Contents of section \.text:
 Contents of section \.reginfo:
  0000 00010000 00000000 00000000 00000000  .*
  0010 00000000 00000000                    .*
+Contents of section \.MIPS\.abiflags:
+ .*
+ .*
 Contents of section foo:
  0000 00000003 00000000 00000000 00000000  .*
+Contents of section \.gnu\.attributes:
+ .*
diff --git a/gas/testsuite/gas/mips/mipsel16-e.d b/gas/testsuite/gas/mips/mipsel16-e.d
index eaff6d8..2686e2c 100644
--- a/gas/testsuite/gas/mips/mipsel16-e.d
+++ b/gas/testsuite/gas/mips/mipsel16-e.d
@@ -13,7 +13,9 @@ SYMBOL TABLE:
 0+0000000 l    d  \.bss	0+0000000 (|\.bss)
 0+0000000 l    d  foo	0+0000000 (|foo)
 0+0000000 l    d  \.reginfo	0+0000000 (|\.reginfo)
+0+0000000 l    d  \.MIPS\.abiflags	0+0000000 (|\.MIPS\.abiflags)
 0+0000000 l    d  \.(mdebug|pdr)	0+0000000 (|\.mdebug|\.pdr)
+0+0000000 l    d  \.gnu\.attributes	0+0000000 (|\.gnu\.attributes)
 0+0000002 l       \.text	0+0000000 0xf0 l1
 0+0000004 l       \.text	0+0000000 0xf0 \.L1.1
 0+0000000         \*UND\*	0+0000000 g1
@@ -34,6 +36,11 @@ Contents of section \.text:
 Contents of section \.reginfo:
  0000 00000100 00000000 00000000 00000000  .*
  0010 00000000 00000000                    .*
+Contents of section \.MIPS\.abiflags:
+ .*
+ .*
 Contents of section foo:
  0000 00000000 08000000 00000000 03000000  .*
  0010 00000000 08000000 00000000 00000000  .*
+Contents of section \.gnu\.attributes:
+ .*
diff --git a/gas/testsuite/gas/mips/mipsel16-f.d b/gas/testsuite/gas/mips/mipsel16-f.d
index 8c1e2ea..21756bd 100644
--- a/gas/testsuite/gas/mips/mipsel16-f.d
+++ b/gas/testsuite/gas/mips/mipsel16-f.d
@@ -13,7 +13,9 @@ SYMBOL TABLE:
 0+0000000 l    d  \.bss	0+0000000 (|\.bss)
 0+0000000 l    d  foo	0+0000000 (|foo)
 0+0000000 l    d  \.reginfo	0+0000000 (|\.reginfo)
+0+0000000 l    d  \.MIPS\.abiflags	0+0000000 (|\.MIPS\.abiflags)
 0+0000000 l    d  \.(mdebug|pdr)	0+0000000 (|\.mdebug|\.pdr)
+0+0000000 l    d  \.gnu\.attributes	0+0000000 (|\.gnu\.attributes)
 0+0000002 l       \.text	0+0000000 0xf0 l1
 
 
@@ -27,5 +29,10 @@ Contents of section \.text:
 Contents of section \.reginfo:
  0000 00000100 00000000 00000000 00000000  .*
  0010 00000000 00000000                    .*
+Contents of section \.MIPS\.abiflags:
+ .*
+ .*
 Contents of section foo:
  0000 03000000 00000000 00000000 00000000  .*
+Contents of section \.gnu\.attributes:
+ .*
diff --git a/gas/testsuite/gas/mips/module-defer-warn2.l b/gas/testsuite/gas/mips/module-defer-warn2.l
index f03ad48..bd37c29 100644
--- a/gas/testsuite/gas/mips/module-defer-warn2.l
+++ b/gas/testsuite/gas/mips/module-defer-warn2.l
@@ -1,3 +1,3 @@
 .*: Assembler messages:
-.*:2: Error: `gp=64' used with a 32-bit processor
-.*:2: Error: `fp=64' used with a 32-bit fpu
+.*:2: Error: `gp=64' used with a 32-bit.*
+.*:2: .*: `fp=64' used with a 32-bit.*
diff --git a/gas/testsuite/gas/mips/module-mfp32.d b/gas/testsuite/gas/mips/module-mfp32.d
index f5c66f6..28b47f6 100644
--- a/gas/testsuite/gas/mips/module-mfp32.d
+++ b/gas/testsuite/gas/mips/module-mfp32.d
@@ -8,14 +8,14 @@ File Attributes
 
 MIPS ABI Flags Version: 0
 
-ISA: MIPS1
+ISA: MIPS.*
 GPR size: 32
 CPR1 size: 32
 CPR2 size: 0
 FP ABI: Hard float \(double precision\)
-ISA Extension: None
+ISA Extension: .*
 ASEs:
 	None
-FLAGS 1: 00000000
+FLAGS 1: 0000000.
 FLAGS 2: 00000000
 
diff --git a/gas/testsuite/gas/mips/module-msingle-float.d b/gas/testsuite/gas/mips/module-msingle-float.d
index 588003f..fe8806a 100644
--- a/gas/testsuite/gas/mips/module-msingle-float.d
+++ b/gas/testsuite/gas/mips/module-msingle-float.d
@@ -8,14 +8,14 @@ File Attributes
 
 MIPS ABI Flags Version: 0
 
-ISA: MIPS1
+ISA: MIPS.*
 GPR size: 32
 CPR1 size: 32
 CPR2 size: 0
 FP ABI: Hard float \(single precision\)
-ISA Extension: None
+ISA Extension: .*
 ASEs:
 	None
-FLAGS 1: 00000000
+FLAGS 1: 0000000.
 FLAGS 2: 00000000
 
diff --git a/gas/testsuite/gas/mips/module-msoft-float.d b/gas/testsuite/gas/mips/module-msoft-float.d
index 98a9ea1..e081e51 100644
--- a/gas/testsuite/gas/mips/module-msoft-float.d
+++ b/gas/testsuite/gas/mips/module-msoft-float.d
@@ -8,14 +8,14 @@ File Attributes
 
 MIPS ABI Flags Version: 0
 
-ISA: MIPS1
+ISA: MIPS.*
 GPR size: 32
 CPR1 size: 0
 CPR2 size: 0
 FP ABI: Soft float
-ISA Extension: None
+ISA Extension: .*
 ASEs:
 	None
-FLAGS 1: 00000000
+FLAGS 1: 0000000.
 FLAGS 2: 00000000
 
diff --git a/gas/testsuite/gas/mips/tmips16-e.d b/gas/testsuite/gas/mips/tmips16-e.d
index 708ff11..f4d1ae4 100644
--- a/gas/testsuite/gas/mips/tmips16-e.d
+++ b/gas/testsuite/gas/mips/tmips16-e.d
@@ -36,11 +36,11 @@ Contents of section \.text:
 Contents of section \.reginfo:
  0000 00010000 00000000 00000000 00000000  .*
  0010 00000000 00000000                    .*
-Contents of section .MIPS.abiflags:
+Contents of section \.MIPS\.abiflags:
  .*
  .*
 Contents of section foo:
  0000 00000000 00000008 00000000 00000003  .*
  0010 00000000 00000008 00000000 00000000  .*
-Contents of section .gnu.attributes:
+Contents of section \.gnu\.attributes:
  .*
diff --git a/gas/testsuite/gas/mips/tmips16-f.d b/gas/testsuite/gas/mips/tmips16-f.d
index 057122c..cb09276 100644
--- a/gas/testsuite/gas/mips/tmips16-f.d
+++ b/gas/testsuite/gas/mips/tmips16-f.d
@@ -29,10 +29,10 @@ Contents of section \.text:
 Contents of section \.reginfo:
  0000 00010000 00000000 00000000 00000000  .*
  0010 00000000 00000000                    .*
-Contents of section .MIPS.abiflags:
+Contents of section \.MIPS\.abiflags:
  .*
  .*
 Contents of section foo:
  0000 00000003 00000000 00000000 00000000  .*
-Contents of section .gnu.attributes:
+Contents of section \.gnu\.attributes:
  .*
diff --git a/gas/testsuite/gas/mips/tmipsel16-e.d b/gas/testsuite/gas/mips/tmipsel16-e.d
index 839446b..ad3f3fa 100644
--- a/gas/testsuite/gas/mips/tmipsel16-e.d
+++ b/gas/testsuite/gas/mips/tmipsel16-e.d
@@ -36,11 +36,11 @@ Contents of section \.text:
 Contents of section \.reginfo:
  0000 00000100 00000000 00000000 00000000  .*
  0010 00000000 00000000                    .*
-Contents of section .MIPS.abiflags:
+Contents of section \.MIPS\.abiflags:
  .*
  .*
 Contents of section foo:
  0000 00000000 08000000 00000000 03000000  .*
  0010 00000000 08000000 00000000 00000000  .*
-Contents of section .gnu.attributes:
+Contents of section \.gnu\.attributes:
  .*
diff --git a/gas/testsuite/gas/mips/tmipsel16-f.d b/gas/testsuite/gas/mips/tmipsel16-f.d
index edc6068..503f8be 100644
--- a/gas/testsuite/gas/mips/tmipsel16-f.d
+++ b/gas/testsuite/gas/mips/tmipsel16-f.d
@@ -29,10 +29,10 @@ Contents of section \.text:
 Contents of section \.reginfo:
  0000 00000100 00000000 00000000 00000000  .*
  0010 00000000 00000000                    .*
-Contents of section .MIPS.abiflags:
+Contents of section \.MIPS\.abiflags:
  .*
  .*
 Contents of section foo:
  0000 03000000 00000000 00000000 00000000  .*
-Contents of section .gnu.attributes:
+Contents of section \.gnu\.attributes:
  .*
diff --git a/ld/testsuite/ld-mips-elf/abiflags-strip1-ph.d b/ld/testsuite/ld-mips-elf/abiflags-strip1-ph.d
index 3af3433..2d437b3 100644
--- a/ld/testsuite/ld-mips-elf/abiflags-strip1-ph.d
+++ b/ld/testsuite/ld-mips-elf/abiflags-strip1-ph.d
@@ -1,9 +1,9 @@
-#source: jr.s -mips32r2 -32 -mfp32 -EB RUN_OBJCOPY
+#source: jr.s -mips32r2 -mfp32 RUN_OBJCOPY
 #objcopy_objects: -R .MIPS.abiflags
-#ld: -melf32btsmip -e 0
+#ld: -e 0
 #objdump: -p
 
-[^:]*:     file format elf32-tradbigmips
+[^:]*:     file format elf32-.*
 
 Program Header:
 #...
diff --git a/ld/testsuite/ld-mips-elf/abiflags-strip2-ph.d b/ld/testsuite/ld-mips-elf/abiflags-strip2-ph.d
index 1da7840..373aa07 100644
--- a/ld/testsuite/ld-mips-elf/abiflags-strip2-ph.d
+++ b/ld/testsuite/ld-mips-elf/abiflags-strip2-ph.d
@@ -1,17 +1,15 @@
-#source: jr.s -mips32r2 -32 -mfpxx -EB
-#source: jr.s -march=octeon -32 -mfp64 -EB RUN_OBJCOPY
-#ld: -melf32btsmip -e 0
+#source: jr.s -mips32r2 -mfpxx
+#source: jr.s -march=octeon -mfp64 RUN_OBJCOPY
+#ld: -e 0
 #objcopy_objects: -R .MIPS.abiflags
 #objdump: -p
 
-[^:]*:     file format elf32-tradbigmips
+[^:]*:     file format elf32-.*
 
 Program Header:
-0x70000003 off    0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+0x70000003 off    0x0000.... vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
          filesz 0x00000018 memsz 0x00000018 flags r--
 #...
-    LOAD off    0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
-         filesz 0x000000.. memsz 0x000000.. flags r-x
 private flags = 808b1100: \[abi=O32\] \[mips64r2\] \[32bitmode\]
 
 MIPS ABI Flags Version: 0
diff --git a/ld/testsuite/ld-mips-elf/abiflags-strip3-ph.d b/ld/testsuite/ld-mips-elf/abiflags-strip3-ph.d
index df5640a..98a3c40 100644
--- a/ld/testsuite/ld-mips-elf/abiflags-strip3-ph.d
+++ b/ld/testsuite/ld-mips-elf/abiflags-strip3-ph.d
@@ -1,17 +1,15 @@
-#source: jr.s -march=octeon -32 -mfp64 -EB RUN_OBJCOPY
-#source: jr.s -mips32r2 -32 -mfpxx -EB
-#ld: -melf32btsmip -e 0
+#source: jr.s -march=octeon -mfp64 RUN_OBJCOPY
+#source: jr.s -mips32r2 -mfpxx
+#ld: -e 0
 #objcopy_objects: -R .MIPS.abiflags
 #objdump: -p
 
-[^:]*:     file format elf32-tradbigmips
+[^:]*:     file format elf32-.*
 
 Program Header:
-0x70000003 off    0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+0x70000003 off    0x0000.... vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
          filesz 0x00000018 memsz 0x00000018 flags r--
 #...
-    LOAD off    0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
-         filesz 0x000000.. memsz 0x000000.. flags r-x
 private flags = 808b1100: \[abi=O32\] \[mips64r2\] \[32bitmode\]
 
 MIPS ABI Flags Version: 0
diff --git a/ld/testsuite/ld-mips-elf/abiflags-strip4-ph.d b/ld/testsuite/ld-mips-elf/abiflags-strip4-ph.d
index 09ceadf..62f9fb9 100644
--- a/ld/testsuite/ld-mips-elf/abiflags-strip4-ph.d
+++ b/ld/testsuite/ld-mips-elf/abiflags-strip4-ph.d
@@ -1,19 +1,17 @@
-#source: jr.s -march=octeon -32 -mfp64 -EB -mdmx RUN_OBJCOPY
-#source: jr.s -mips32r2 -32 -mfpxx -EB
-#source: jr.s -mips32r2 -32 -mfp64 -mno-odd-spreg -mmsa -EB
-#source: jr.s -mips2 -32 -mfpxx -mips16 -EB RUN_OBJCOPY
-#ld: -melf32btsmip -e 0
+#source: jr.s -march=octeon -mfp64 -mdmx RUN_OBJCOPY
+#source: jr.s -mips32r2 -mfpxx
+#source: jr.s -mips32r2 -mfp64 -mno-odd-spreg -mmsa
+#source: jr.s -mips2 -mfpxx -mips16 RUN_OBJCOPY
+#ld: -e 0
 #objcopy_objects: -R .MIPS.abiflags
 #objdump: -p
 
-[^:]*:     file format elf32-tradbigmips
+[^:]*:     file format elf32-.*
 
 Program Header:
-0x70000003 off    0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+0x70000003 off    0x0000.... vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
          filesz 0x00000018 memsz 0x00000018 flags r--
 #...
-    LOAD off    0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
-         filesz 0x00000... memsz 0x00000... flags r-x
 private flags = 8c8b1100: \[abi=O32\] \[mips64r2\] \[mdmx\] \[mips16\] \[32bitmode\]
 
 MIPS ABI Flags Version: 0
diff --git a/ld/testsuite/ld-mips-elf/abiflags-strip5-ph.d b/ld/testsuite/ld-mips-elf/abiflags-strip5-ph.d
index bde7096..9381d46 100644
--- a/ld/testsuite/ld-mips-elf/abiflags-strip5-ph.d
+++ b/ld/testsuite/ld-mips-elf/abiflags-strip5-ph.d
@@ -1,19 +1,17 @@
-#source: jr.s -mips32r2 -32 -mfpxx -EB
-#source: jr.s -mips32r2 -32 -mfp64 -mmsa -EB
-#source: jr.s -march=octeon -32 -mfp64 -EB -mdmx RUN_OBJCOPY
-#source: jr.s -mips2 -32 -mips16 -mfpxx -EB RUN_OBJCOPY
-#ld: -melf32btsmip -e 0
+#source: jr.s -mips32r2 -mfpxx
+#source: jr.s -mips32r2 -mfp64 -mmsa
+#source: jr.s -march=octeon -mfp64 -mdmx RUN_OBJCOPY
+#source: jr.s -mips2 -mips16 -mfpxx RUN_OBJCOPY
+#ld: -e 0
 #objcopy_objects: -R .MIPS.abiflags
 #objdump: -p
 
-[^:]*:     file format elf32-tradbigmips
+[^:]*:     file format elf32-.*
 
 Program Header:
-0x70000003 off    0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+0x70000003 off    0x0000.... vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
          filesz 0x00000018 memsz 0x00000018 flags r--
 #...
-    LOAD off    0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
-         filesz 0x00000... memsz 0x00000... flags r-x
 private flags = 8c8b1100: \[abi=O32\] \[mips64r2\] \[mdmx\] \[mips16\] \[32bitmode\]
 
 MIPS ABI Flags Version: 0
diff --git a/ld/testsuite/ld-mips-elf/abiflags-strip6-ph.d b/ld/testsuite/ld-mips-elf/abiflags-strip6-ph.d
index 3abb336..ef4c9ca 100644
--- a/ld/testsuite/ld-mips-elf/abiflags-strip6-ph.d
+++ b/ld/testsuite/ld-mips-elf/abiflags-strip6-ph.d
@@ -1,17 +1,15 @@
-#source: jr.s -mips32r3 -32 -EB RUN_OBJCOPY
-#source: jr.s -mips32r2 -32 -EB
-#ld: -melf32btsmip -e 0
+#source: jr.s -mips32r3 RUN_OBJCOPY
+#source: jr.s -mips32r2
+#ld: -e 0
 #objcopy_objects: -R .MIPS.abiflags
 #objdump: -p
 
-[^:]*:     file format elf32-tradbigmips
+[^:]*:     file format elf32-.*
 
 Program Header:
-0x70000003 off    0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+0x70000003 off    0x0000.... vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
          filesz 0x00000018 memsz 0x00000018 flags r--
 #...
-    LOAD off    0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
-         filesz 0x000000.. memsz 0x000000.. flags r-x
 private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
 
 MIPS ABI Flags Version: 0
diff --git a/ld/testsuite/ld-mips-elf/abiflags-strip7-ph.d b/ld/testsuite/ld-mips-elf/abiflags-strip7-ph.d
index d8f5dc5..9cb73c9 100644
--- a/ld/testsuite/ld-mips-elf/abiflags-strip7-ph.d
+++ b/ld/testsuite/ld-mips-elf/abiflags-strip7-ph.d
@@ -1,17 +1,15 @@
-#source: jr.s -mips32r3 -32 -EB
-#source: jr.s -mips32r2 -32 -EB RUN_OBJCOPY
-#ld: -melf32btsmip -e 0
+#source: jr.s -mips32r3
+#source: jr.s -mips32r2 RUN_OBJCOPY
+#ld: -e 0
 #objcopy_objects: -R .MIPS.abiflags
 #objdump: -p
 
-[^:]*:     file format elf32-tradbigmips
+[^:]*:     file format elf32-.*
 
 Program Header:
-0x70000003 off    0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+0x70000003 off    0x0000.... vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
          filesz 0x00000018 memsz 0x00000018 flags r--
 #...
-    LOAD off    0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
-         filesz 0x000000.. memsz 0x000000.. flags r-x
 private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
 
 MIPS ABI Flags Version: 0
diff --git a/ld/testsuite/ld-mips-elf/abiflags-strip8-ph.d b/ld/testsuite/ld-mips-elf/abiflags-strip8-ph.d
index 840dc59..b2e1d5f 100644
--- a/ld/testsuite/ld-mips-elf/abiflags-strip8-ph.d
+++ b/ld/testsuite/ld-mips-elf/abiflags-strip8-ph.d
@@ -1,17 +1,15 @@
-#source: jr.s -mips32r2 -32 -mfpxx -EB
-#source: jr.s -mips32r2 -32 -mfp64 -EB RUN_OBJCOPY
-#ld: -melf32btsmip -e 0
+#source: jr.s -mips32r2 -mfpxx
+#source: jr.s -mips32r2 -mfp64 RUN_OBJCOPY
+#ld: -e 0
 #objcopy_objects: -R .gnu.attributes
 #objdump: -p
 
-[^:]*:     file format elf32-tradbigmips
+[^:]*:     file format elf32-.*
 
 Program Header:
-0x70000003 off    0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+0x70000003 off    0x0000.... vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
          filesz 0x00000018 memsz 0x00000018 flags r--
 #...
-    LOAD off    0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
-         filesz 0x000000.. memsz 0x000000.. flags r-x
 private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
 
 MIPS ABI Flags Version: 0
diff --git a/ld/testsuite/ld-mips-elf/abiflags-strip9-ph.d b/ld/testsuite/ld-mips-elf/abiflags-strip9-ph.d
index f42961b..7297927 100644
--- a/ld/testsuite/ld-mips-elf/abiflags-strip9-ph.d
+++ b/ld/testsuite/ld-mips-elf/abiflags-strip9-ph.d
@@ -1,17 +1,15 @@
-#source: jr.s -mips32r2 -32 -mfpxx -EB
-#source: jr.s -mips32r2 -32 -mfp64 -mno-odd-spreg -EB RUN_OBJCOPY
-#ld: -melf32btsmip -e 0
+#source: jr.s -mips32r2 -mfpxx
+#source: jr.s -mips32r2 -mfp64 -mno-odd-spreg RUN_OBJCOPY
+#ld: -e 0
 #objcopy_objects: -R .gnu.attributes
 #objdump: -p
 
-[^:]*:     file format elf32-tradbigmips
+[^:]*:     file format elf32-.*
 
 Program Header:
-0x70000003 off    0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+0x70000003 off    0x0000.... vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
          filesz 0x00000018 memsz 0x00000018 flags r--
 #...
-    LOAD off    0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
-         filesz 0x000000.. memsz 0x000000.. flags r-x
 private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
 
 MIPS ABI Flags Version: 0
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-0-n32-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-0-n32-ph.d
index 0fb6988..40cbac8 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-0-n32-ph.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-0-n32-ph.d
@@ -5,7 +5,7 @@
 [^:]*:     file format elf32-ntradbigmips
 
 Program Header:
-0x70000003 off    0x000000.. vaddr 0x100000.. paddr 0x100000.. align 2\*\*3
+0x70000003 off    0x0000.... vaddr 0x100000.. paddr 0x100000.. align 2\*\*3
          filesz 0x00000018 memsz 0x00000018 flags r--
 #...
     LOAD off    0x00000000 vaddr 0x10000000 paddr 0x10000000 align 2\*\*16
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-0-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-0-ph.d
index eb33a70..c3127d3 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-0-ph.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-0-ph.d
@@ -1,15 +1,13 @@
-#source: attr-gnu-4-0.s -mips32r2 -32 -EB
-#ld: -melf32btsmip -e 0
+#source: attr-gnu-4-0.s -mips32r2
+#ld: -e 0
 #objdump: -p
 
-[^:]*:     file format elf32-tradbigmips
+[^:]*:     file format elf32-.*
 
 Program Header:
-0x70000003 off    0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+0x70000003 off    0x0000.... vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
          filesz 0x00000018 memsz 0x00000018 flags r--
 #...
-    LOAD off    0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
-         filesz 0x000000.. memsz 0x000000.. flags r--
 private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
 
 MIPS ABI Flags Version: 0
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-05.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-05.d
index 46b94805..6510169 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-05.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-05.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-0.s -32 -EB
-#source: attr-gnu-4-5.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-0.s -mips32r2
+#source: attr-gnu-4-5.s
+#ld: -r
 #readelf: -A
 
 Attribute Section: gnu
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-06.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-06.d
index c23c0dc..1a3c3a8 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-06.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-06.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-0.s -32 -EB
-#source: attr-gnu-4-6.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-0.s -mips32r2
+#source: attr-gnu-4-6.s
+#ld: -r
 #readelf: -A
 
 Attribute Section: gnu
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-07.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-07.d
index 040c06f..f98afbd 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-07.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-07.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-0.s -32 -EB
-#source: attr-gnu-4-7.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-0.s -mips32r2
+#source: attr-gnu-4-7.s
+#ld: -r
 #readelf: -A
 
 Attribute Section: gnu
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-1-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-1-ph.d
index 7aacd65..dc1e5c7 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-1-ph.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-1-ph.d
@@ -1,15 +1,13 @@
-#source: empty.s -mips32r2 -32 -mfp32 -EB
-#ld: -melf32btsmip -e 0
+#source: empty.s -mips32r2 -mfp32
+#ld: -e 0
 #objdump: -p
 
-[^:]*:     file format elf32-tradbigmips
+[^:]*:     file format elf32-.*
 
 Program Header:
-0x70000003 off    0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+0x70000003 off    0x0000.... vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
          filesz 0x00000018 memsz 0x00000018 flags r--
 #...
-    LOAD off    0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
-         filesz 0x000000.. memsz 0x000000.. flags r--
 private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
 
 MIPS ABI Flags Version: 0
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-10.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-10.d
index 0abd9d1..2775e4d 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-10.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-10.d
@@ -1,12 +1,12 @@
-#source: attr-gnu-4-1.s -EB -32
-#source: attr-gnu-4-0.s -EB -32
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-1.s
+#source: attr-gnu-4-0.s
+#ld: -r
 #readelf: -hA
 
 ELF Header:
-  Magic:   7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00.*
+  Magic:   .*
   Class:                             ELF32
-  Data:                              2's complement, big endian
+  Data:                              2's complement,.*
   Version:                           1 \(current\)
   OS/ABI:                            UNIX - System V
   ABI Version:                       0
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-15.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-15.d
index 29d2eb9..0f88cc2 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-15.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-15.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-1.s -32 -EB
-#source: attr-gnu-4-5.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-1.s -mips32r2
+#source: attr-gnu-4-5.s
+#ld: -r
 #readelf: -A
 
 Attribute Section: gnu
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-16.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-16.d
index 1e55b05..73a6fd8 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-16.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-16.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-1.s -32 -EB
-#source: attr-gnu-4-6.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-1.s -mips32r2
+#source: attr-gnu-4-6.s
+#ld: -r
 #readelf: -A
 #warning: Warning: .* uses -mdouble-float \(set by .*\), .* uses -mgp32 -mfp64
 
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-17.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-17.d
index f72eb0b..68c9617 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-17.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-17.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-1.s -32 -EB
-#source: attr-gnu-4-7.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-1.s -mips32r2
+#source: attr-gnu-4-7.s
+#ld: -r
 #readelf: -A
 #warning: Warning: .* uses -mdouble-float \(set by .*\), .* uses -mgp32 -mfp64 -mno-odd-spreg
 
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-2-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-2-ph.d
index 509834c..0010520 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-2-ph.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-2-ph.d
@@ -1,15 +1,13 @@
-#source: empty.s -mips32r2 -32 -msingle-float -EB
-#ld: -melf32btsmip -e 0
+#source: empty.s -mips32r2 -msingle-float
+#ld: -e 0
 #objdump: -p
 
-[^:]*:     file format elf32-tradbigmips
+[^:]*:     file format elf32-.*
 
 Program Header:
-0x70000003 off    0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+0x70000003 off    0x0000.... vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
          filesz 0x00000018 memsz 0x00000018 flags r--
 #...
-    LOAD off    0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
-         filesz 0x000000.. memsz 0x000000.. flags r--
 private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
 
 MIPS ABI Flags Version: 0
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-25.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-25.d
index 711eb10..c32f5b4 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-25.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-25.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-2.s -32 -EB
-#source: attr-gnu-4-5.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-2.s -mips32r2
+#source: attr-gnu-4-5.s
+#ld: -r
 #readelf: -A
 #warning: Warning: .* uses -msingle-float \(set by .*\), .* uses -mfpxx
 
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-26.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-26.d
index 2c72a57..43fe4cb 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-26.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-26.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-2.s -32 -EB
-#source: attr-gnu-4-6.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-2.s -mips32r2
+#source: attr-gnu-4-6.s
+#ld: -r
 #readelf: -A
 #warning: Warning: .* uses -msingle-float \(set by .*\), .* uses -mgp32 -mfp64
 
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-27.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-27.d
index e7aeb1a..9af8eac 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-27.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-27.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-2.s -32 -EB
-#source: attr-gnu-4-7.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-2.s -mips32r2
+#source: attr-gnu-4-7.s
+#ld: -r
 #readelf: -A
 #warning: Warning: .* uses -msingle-float \(set by .*\), .* uses -mgp32 -mfp64 -mno-odd-spreg
 
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-3-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-3-ph.d
index edeb6b1..6aa35d6 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-3-ph.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-3-ph.d
@@ -1,15 +1,13 @@
-#source: empty.s -mips32r2 -32 -msoft-float -EB
-#ld: -melf32btsmip -e 0
+#source: empty.s -mips32r2 -msoft-float
+#ld: -e 0
 #objdump: -p
 
-[^:]*:     file format elf32-tradbigmips
+[^:]*:     file format elf32-.*
 
 Program Header:
-0x70000003 off    0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+0x70000003 off    0x0000.... vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
          filesz 0x00000018 memsz 0x00000018 flags r--
 #...
-    LOAD off    0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
-         filesz 0x000000.. memsz 0x000000.. flags r--
 private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
 
 MIPS ABI Flags Version: 0
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-35.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-35.d
index 19fbce4..131f44b 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-35.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-35.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-3.s -32 -EB
-#source: attr-gnu-4-5.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-3.s -mips32r2
+#source: attr-gnu-4-5.s
+#ld: -r
 #readelf: -A
 #warning: Warning: .* uses -msoft-float \(set by .*\), .* uses -mhard-float
 
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-36.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-36.d
index de7393b..2762696 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-36.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-36.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-3.s -32 -EB
-#source: attr-gnu-4-6.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-3.s -mips32r2
+#source: attr-gnu-4-6.s
+#ld: -r
 #readelf: -A
 #warning: Warning: .* uses -msoft-float \(set by .*\), .* uses -mhard-float
 
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-37.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-37.d
index 0702cb5..06f37c5 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-37.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-37.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-3.s -32 -EB
-#source: attr-gnu-4-7.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-3.s -mips32r2
+#source: attr-gnu-4-7.s
+#ld: -r
 #readelf: -A
 #warning: Warning: .* uses -msoft-float \(set by .*\), .* uses -mhard-float
 
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-4-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-4-ph.d
index 13f5267..3f0a1f6 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-4-ph.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-4-ph.d
@@ -1,15 +1,13 @@
-#source: attr-gnu-4-4.s -mips32r2 -32 -EB -W
-#ld: -melf32btsmip -e 0
+#source: attr-gnu-4-4.s -mips32r2 -W
+#ld: -e 0
 #objdump: -p
 
-[^:]*:     file format elf32-tradbigmips
+[^:]*:     file format elf32-.*
 
 Program Header:
-0x70000003 off    0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+0x70000003 off    0x0000.... vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
          filesz 0x00000018 memsz 0x00000018 flags r--
 #...
-    LOAD off    0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
-         filesz 0x000000.. memsz 0x000000.. flags r--
 private flags = 70001200: \[abi=O32\] \[mips32r2\] \[old fp64\] \[not 32bitmode\]
 
 MIPS ABI Flags Version: 0
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-45.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-45.d
index d21e66f..c8716e3 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-45.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-45.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-4.s -W -32 -EB
-#source: attr-gnu-4-5.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-4.s -W -mips32r2
+#source: attr-gnu-4-5.s
+#ld: -r
 #error: \A[^\n]*: Warning: .* uses -mips32r2 -mfp64 \(12 callee-saved\) \(set by .*\), .* uses -mfpxx\n
 #error:   [^\n]*: [^\n]* linking -mfp32 module with previous -mfp64 modules\n
 #error:   [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-46.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-46.d
index fb8baf8..9fa1b01 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-46.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-46.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-4.s -W -32 -EB
-#source: attr-gnu-4-6.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-4.s -W -mips32r2
+#source: attr-gnu-4-6.s
+#ld: -r
 #error: \A[^\n]*: Warning: .* uses -mips32r2 -mfp64 \(12 callee-saved\) \(set by .*\), .* uses -mgp32 -mfp64\n
 #error:   [^\n]*: [^\n]* linking -mfp32 module with previous -mfp64 modules\n
 #error:   [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-47.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-47.d
index 889e0e1..acb736b 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-47.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-47.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-4.s -W -32 -EB
-#source: attr-gnu-4-7.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-4.s -W -mips32r2
+#source: attr-gnu-4-7.s
+#ld: -r
 #error: \A[^\n]*: Warning: .* uses -mips32r2 -mfp64 \(12 callee-saved\) \(set by .*\), .* uses -mgp32 -mfp64 -mno-odd-spreg\n
 #error:   [^\n]*: [^\n]* linking -mfp32 module with previous -mfp64 modules\n
 #error:   [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-5-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-5-ph.d
index b68bbf3..1b5616c 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-5-ph.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-5-ph.d
@@ -1,15 +1,13 @@
-#source: empty.s -mips32r2 -32 -mfpxx -EB
-#ld: -melf32btsmip -e 0
+#source: empty.s -mips32r2 -mfpxx
+#ld: -e 0
 #objdump: -p
 
-[^:]*:     file format elf32-tradbigmips
+[^:]*:     file format elf32-.*
 
 Program Header:
-0x70000003 off    0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+0x70000003 off    0x0000.... vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
          filesz 0x00000018 memsz 0x00000018 flags r--
 #...
-    LOAD off    0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
-         filesz 0x000000.. memsz 0x000000.. flags r--
 private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
 
 MIPS ABI Flags Version: 0
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-50.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-50.d
index ac848ed..651277d 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-50.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-50.d
@@ -1,12 +1,12 @@
-#source: attr-gnu-4-5.s -32 -EB
-#source: attr-gnu-4-0.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-5.s
+#source: attr-gnu-4-0.s -mips32r2
+#ld: -r
 #readelf: -hA
 
 ELF Header:
-  Magic:   7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00.*
+  Magic:   .*
   Class:                             ELF32
-  Data:                              2's complement, big endian
+  Data:                              2's complement,.*
   Version:                           1 \(current\)
   OS/ABI:                            UNIX - System V
   ABI Version:                       0
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-51.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-51.d
index 72ad878..81dc1a9 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-51.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-51.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-5.s -32 -EB
-#source: attr-gnu-4-1.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-5.s
+#source: attr-gnu-4-1.s -mips32r2
+#ld: -r
 #readelf: -A
 
 Attribute Section: gnu
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-52.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-52.d
index b36547d..4ea6033 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-52.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-52.d
@@ -1,4 +1,4 @@
-#source: attr-gnu-4-5.s -32 -EB
-#source: attr-gnu-4-2.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-5.s
+#source: attr-gnu-4-2.s -mips32r2
+#ld: -r
 #warning: Warning: .* uses -mfpxx \(set by .*\), .* uses -msingle-float
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-53.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-53.d
index 7312d17..4fbe58d 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-53.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-53.d
@@ -1,4 +1,4 @@
-#source: attr-gnu-4-5.s -32 -EB
-#source: attr-gnu-4-3.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-5.s
+#source: attr-gnu-4-3.s -mips32r2
+#ld: -r
 #warning: Warning: .* uses -mhard-float \(set by .*\), .* uses -msoft-float
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-54.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-54.d
index a5beaf1..04155af 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-54.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-54.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-5.s -32 -EB
-#source: attr-gnu-4-4.s -W -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-5.s
+#source: attr-gnu-4-4.s -W -mips32r2
+#ld: -r
 #error: \A[^\n]*: Warning: .* uses -mfpxx \(set by .*\), .* uses -mips32r2 -mfp64 \(12 callee-saved\)\n
 #error:   [^\n]*: [^\n]* linking -mfp64 module with previous -mfp32 modules\n
 #error:   [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-55.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-55.d
index d4569ad..af6d42d 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-55.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-55.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-5.s -32 -EB
-#source: attr-gnu-4-5.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-5.s
+#source: attr-gnu-4-5.s
+#ld: -r
 #readelf: -A
 
 Attribute Section: gnu
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-56.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-56.d
index d63150d..d1b7209 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-56.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-56.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-5.s -32 -EB
-#source: attr-gnu-4-6.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-5.s
+#source: attr-gnu-4-6.s
+#ld: -r
 #readelf: -A
 
 Attribute Section: gnu
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-57.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-57.d
index 5de1678..73ba8d3 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-57.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-57.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-5.s -32 -EB
-#source: attr-gnu-4-7.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-5.s
+#source: attr-gnu-4-7.s
+#ld: -r
 #readelf: -A
 
 Attribute Section: gnu
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-58.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-58.d
index 83d6747..77470c8 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-58.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-58.d
@@ -1,4 +1,4 @@
-#source: attr-gnu-4-5.s -32 -EB
-#source: attr-gnu-4-8.s -W -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-5.s
+#source: attr-gnu-4-8.s -W -mips32r2
+#ld: -r
 #warning: Warning: .* uses -mfpxx \(set by .*\), .* uses unknown floating point ABI 8
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-6-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-6-ph.d
index 9628991..42545c8 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-6-ph.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-6-ph.d
@@ -1,15 +1,13 @@
-#source: empty.s -mips32r2 -32 -mfp64 -EB
-#ld: -melf32btsmip -e 0
+#source: empty.s -mips32r2 -mfp64
+#ld: -e 0
 #objdump: -p
 
-[^:]*:     file format elf32-tradbigmips
+[^:]*:     file format elf32-.*
 
 Program Header:
-0x70000003 off    0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+0x70000003 off    0x0000.... vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
          filesz 0x00000018 memsz 0x00000018 flags r--
 #...
-    LOAD off    0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
-         filesz 0x000000.. memsz 0x000000.. flags r--
 private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
 
 MIPS ABI Flags Version: 0
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-60.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-60.d
index 62e6a2c..80977a86 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-60.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-60.d
@@ -1,12 +1,12 @@
-#source: attr-gnu-4-6.s -32 -EB
-#source: attr-gnu-4-0.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-6.s
+#source: attr-gnu-4-0.s -mips32r2
+#ld: -r
 #readelf: -hA
 
 ELF Header:
-  Magic:   7f 45 4c 46 01 02 01 00 03 00 00 00 00 00 00 00.*
+  Magic:   .*
   Class:                             ELF32
-  Data:                              2's complement, big endian
+  Data:                              2's complement,.*
   Version:                           1 \(current\)
   OS/ABI:                            UNIX - System V
   ABI Version:                       3
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-61.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-61.d
index 6e9040c..4505516 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-61.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-61.d
@@ -1,4 +1,4 @@
-#source: attr-gnu-4-6.s -32 -EB
-#source: attr-gnu-4-1.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-6.s
+#source: attr-gnu-4-1.s -mips32r2
+#ld: -r
 #warning: Warning: .* uses -mgp32 -mfp64 \(set by .*\), .* uses -mdouble-float
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-62.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-62.d
index 5eec884..9aa789d 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-62.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-62.d
@@ -1,4 +1,4 @@
-#source: attr-gnu-4-6.s -32 -EB
-#source: attr-gnu-4-2.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-6.s
+#source: attr-gnu-4-2.s -mips32r2
+#ld: -r
 #warning: Warning: .* uses -mgp32 -mfp64 \(set by .*\), .* uses -msingle-float
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-63.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-63.d
index eb750f3..4f9f737 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-63.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-63.d
@@ -1,4 +1,4 @@
-#source: attr-gnu-4-6.s -32 -EB
-#source: attr-gnu-4-3.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-6.s
+#source: attr-gnu-4-3.s -mips32r2
+#ld: -r
 #warning: Warning: .* uses -mhard-float \(set by .*\), .* uses -msoft-float
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-64.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-64.d
index a5dcb7e..98a3b34 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-64.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-64.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-6.s -32 -EB
-#source: attr-gnu-4-4.s -W -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-6.s
+#source: attr-gnu-4-4.s -W -mips32r2
+#ld: -r
 #error: \A[^\n]*: Warning: .* uses -mgp32 -mfp64 \(set by .*\), .* uses -mips32r2 -mfp64 \(12 callee-saved\)\n
 #error:   [^\n]*: [^\n]* linking -mfp64 module with previous -mfp32 modules\n
 #error:   [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-65.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-65.d
index ccf19b8..ecf02d3 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-65.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-65.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-6.s -32 -EB
-#source: attr-gnu-4-5.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-6.s
+#source: attr-gnu-4-5.s
+#ld: -r
 #readelf: -A
 
 Attribute Section: gnu
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-66.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-66.d
index 552e6d2..cdccc0a 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-66.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-66.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-6.s -32 -EB
-#source: attr-gnu-4-6.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-6.s
+#source: attr-gnu-4-6.s
+#ld: -r
 #readelf: -A
 
 Attribute Section: gnu
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-67.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-67.d
index 171af5b..8306b2e 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-67.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-67.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-6.s -32 -EB
-#source: attr-gnu-4-7.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-6.s
+#source: attr-gnu-4-7.s
+#ld: -r
 #readelf: -A
 
 Attribute Section: gnu
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-68.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-68.d
index e850b03..f696dee 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-68.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-68.d
@@ -1,4 +1,4 @@
-#source: attr-gnu-4-6.s -32 -EB
-#source: attr-gnu-4-8.s -W -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-6.s
+#source: attr-gnu-4-8.s -W -mips32r2
+#ld: -r
 #warning: Warning: .* uses -mgp32 -mfp64 \(set by .*\), .* uses unknown floating point ABI 8
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-7-ph.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-7-ph.d
index b0245b6..ac4a0a8 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-7-ph.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-7-ph.d
@@ -1,15 +1,13 @@
-#source: empty.s -mips32r2 -32 -mfp64 -mno-odd-spreg -EB
-#ld: -melf32btsmip -e 0
+#source: empty.s -mips32r2 -mfp64 -mno-odd-spreg
+#ld: -e 0
 #objdump: -p
 
-[^:]*:     file format elf32-tradbigmips
+[^:]*:     file format elf32-.*
 
 Program Header:
-0x70000003 off    0x000000.. vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
+0x70000003 off    0x0000.... vaddr 0x004000.. paddr 0x004000.. align 2\*\*3
          filesz 0x00000018 memsz 0x00000018 flags r--
 #...
-    LOAD off    0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2\*\*16
-         filesz 0x000000.. memsz 0x000000.. flags r--
 private flags = 70001000: \[abi=O32\] \[mips32r2\] \[not 32bitmode\]
 
 MIPS ABI Flags Version: 0
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-70.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-70.d
index 784401e..3cd3250 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-70.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-70.d
@@ -1,12 +1,12 @@
-#source: attr-gnu-4-7.s -32 -EB
-#source: attr-gnu-4-0.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-7.s
+#source: attr-gnu-4-0.s -mips32r2
+#ld: -r
 #readelf: -hA
 
 ELF Header:
-  Magic:   7f 45 4c 46 01 02 01 00 03 00 00 00 00 00 00 00.*
+  Magic:   .*
   Class:                             ELF32
-  Data:                              2's complement, big endian
+  Data:                              2's complement,.*
   Version:                           1 \(current\)
   OS/ABI:                            UNIX - System V
   ABI Version:                       3
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-71.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-71.d
index b61b6c5..d2d8b60 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-71.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-71.d
@@ -1,4 +1,4 @@
-#source: attr-gnu-4-7.s -32 -EB
-#source: attr-gnu-4-1.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-7.s
+#source: attr-gnu-4-1.s -mips32r2
+#ld: -r
 #warning: Warning: .* uses -mgp32 -mfp64 -mno-odd-spreg \(set by .*\), .* uses -mdouble-float
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-72.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-72.d
index 1d7dec5..4ede98f 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-72.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-72.d
@@ -1,4 +1,4 @@
-#source: attr-gnu-4-7.s -32 -EB
-#source: attr-gnu-4-2.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-7.s
+#source: attr-gnu-4-2.s -mips32r2
+#ld: -r
 #warning: Warning: .* uses -mgp32 -mfp64 -mno-odd-spreg \(set by .*\), .* uses -msingle-float
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-73.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-73.d
index 41c0fdc..cb87839 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-73.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-73.d
@@ -1,4 +1,4 @@
-#source: attr-gnu-4-7.s -32 -EB
-#source: attr-gnu-4-3.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-7.s
+#source: attr-gnu-4-3.s -mips32r2
+#ld: -r
 #warning: Warning: .* uses -mhard-float \(set by .*\), .* uses -msoft-float
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-74.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-74.d
index cc9279b..90eeaff 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-74.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-74.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-7.s -32 -EB
-#source: attr-gnu-4-4.s -W -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-7.s
+#source: attr-gnu-4-4.s -W -mips32r2
+#ld: -r
 #error: \A[^\n]*: Warning: .* uses -mgp32 -mfp64 -mno-odd-spreg \(set by .*\), .* uses -mips32r2 -mfp64 \(12 callee-saved\)\n
 #error:   [^\n]*: [^\n]* linking -mfp64 module with previous -mfp32 modules\n
 #error:   [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-75.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-75.d
index 9b0e587..8311658 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-75.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-75.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-7.s -32 -EB
-#source: attr-gnu-4-5.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-7.s
+#source: attr-gnu-4-5.s
+#ld: -r
 #readelf: -A
 
 Attribute Section: gnu
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-76.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-76.d
index d8f666b..47c7894 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-76.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-76.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-7.s -32 -EB
-#source: attr-gnu-4-6.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-7.s
+#source: attr-gnu-4-6.s
+#ld: -r
 #readelf: -A
 
 Attribute Section: gnu
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-77.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-77.d
index 50d0236..4c93528 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-77.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-77.d
@@ -1,6 +1,6 @@
-#source: attr-gnu-4-7.s -32 -EB
-#source: attr-gnu-4-7.s -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-7.s
+#source: attr-gnu-4-7.s
+#ld: -r
 #readelf: -A
 
 Attribute Section: gnu
diff --git a/ld/testsuite/ld-mips-elf/attr-gnu-4-78.d b/ld/testsuite/ld-mips-elf/attr-gnu-4-78.d
index b04ad22..1a9012d 100644
--- a/ld/testsuite/ld-mips-elf/attr-gnu-4-78.d
+++ b/ld/testsuite/ld-mips-elf/attr-gnu-4-78.d
@@ -1,4 +1,4 @@
-#source: attr-gnu-4-7.s -32 -EB
-#source: attr-gnu-4-8.s -W -32 -EB
-#ld: -r -melf32btsmip
+#source: attr-gnu-4-7.s
+#source: attr-gnu-4-8.s -W -mips32r2
+#ld: -r
 #warning: Warning: .* uses -mgp32 -mfp64 -mno-odd-spreg \(set by .*\), .* uses unknown floating point ABI 8
diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp
index 64bb8e5..27108d4 100644
--- a/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ b/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -60,7 +60,7 @@ set linux_gnu [expr [istarget mips*-*-linux*]]
 set embedded_elf [expr [istarget mips*-*-elf]]
 
 # Set defaults.
-set abi_asflags(o32) ""
+set abi_asflags(o32) "-32"
 set abi_asflags(n32) "-march=from-abi -n32 -EB"
 set abi_asflags(n64) "-march=from-abi -64 -EB"
 set abi_ldflags(o32) ""
@@ -634,11 +634,24 @@ run_ld_link_tests $mips16_intermix_test
 
 run_dump_test "mips16-local-stubs-1"
 
+set o32flagslist [list [list as $abi_asflags(o32)] [list ld $abi_ldflags(o32)]]
+
 foreach firstfpabi [list 0 1 2 3 4 5 6 7 ] {
-  foreach secondfpabi [list 0 1 2 3 4 5 6 7 8] {
+  foreach secondfpabi [list 4 5 6 7 ] {
+    run_dump_test "attr-gnu-4-${firstfpabi}${secondfpabi}" $o32flagslist
+  }
+}
+foreach firstfpabi [list 4 5 6 7 ] {
+  foreach secondfpabi [list 0 1 2 3 8] {
+    run_dump_test "attr-gnu-4-${firstfpabi}${secondfpabi}" $o32flagslist
+  }
+}
+foreach firstfpabi [list 0 1 2 3 ] {
+  foreach secondfpabi [list 0 1 2 3 8] {
     run_dump_test "attr-gnu-4-${firstfpabi}${secondfpabi}"
   }
 }
+
 run_dump_test "attr-gnu-4-81"
 
 run_dump_test "attr-gnu-8-00"
@@ -651,32 +664,35 @@ run_dump_test "attr-gnu-8-20"
 run_dump_test "attr-gnu-8-21"
 run_dump_test "attr-gnu-8-22"
 
-run_dump_test "attr-gnu-4-0-ph"
-run_dump_test "attr-gnu-4-1-ph"
-run_dump_test "attr-gnu-4-2-ph"
-run_dump_test "attr-gnu-4-3-ph"
-run_dump_test "attr-gnu-4-4-ph"
-run_dump_test "attr-gnu-4-5-ph"
-run_dump_test "attr-gnu-4-6-ph"
-run_dump_test "attr-gnu-4-7-ph"
-run_dump_test "attr-gnu-4-0-n32-ph"
-run_dump_test "attr-gnu-4-1-n32-ph"
-run_dump_test "attr-gnu-4-2-n32-ph"
-run_dump_test "attr-gnu-4-3-n32-ph"
-run_dump_test "attr-gnu-4-0-n64-ph"
-run_dump_test "attr-gnu-4-1-n64-ph"
-run_dump_test "attr-gnu-4-2-n64-ph"
-run_dump_test "attr-gnu-4-3-n64-ph"
-
-run_dump_test "abiflags-strip1-ph"
-run_dump_test "abiflags-strip2-ph"
-run_dump_test "abiflags-strip3-ph"
-run_dump_test "abiflags-strip4-ph"
-run_dump_test "abiflags-strip5-ph"
-run_dump_test "abiflags-strip6-ph"
-run_dump_test "abiflags-strip7-ph"
-run_dump_test "abiflags-strip8-ph"
-run_dump_test "abiflags-strip9-ph"
+run_dump_test "attr-gnu-4-0-ph" $o32flagslist
+run_dump_test "attr-gnu-4-1-ph" $o32flagslist
+run_dump_test "attr-gnu-4-2-ph" $o32flagslist
+run_dump_test "attr-gnu-4-3-ph" $o32flagslist
+run_dump_test "attr-gnu-4-4-ph" $o32flagslist
+run_dump_test "attr-gnu-4-5-ph" $o32flagslist
+run_dump_test "attr-gnu-4-6-ph" $o32flagslist
+run_dump_test "attr-gnu-4-7-ph" $o32flagslist
+
+if $has_newabi {
+  run_dump_test "attr-gnu-4-0-n32-ph"
+  run_dump_test "attr-gnu-4-1-n32-ph"
+  run_dump_test "attr-gnu-4-2-n32-ph"
+  run_dump_test "attr-gnu-4-3-n32-ph"
+  run_dump_test "attr-gnu-4-0-n64-ph"
+  run_dump_test "attr-gnu-4-1-n64-ph"
+  run_dump_test "attr-gnu-4-2-n64-ph"
+  run_dump_test "attr-gnu-4-3-n64-ph"
+}
+
+run_dump_test "abiflags-strip1-ph" $o32flagslist
+run_dump_test "abiflags-strip2-ph" $o32flagslist
+run_dump_test "abiflags-strip3-ph" $o32flagslist
+run_dump_test "abiflags-strip4-ph" $o32flagslist
+run_dump_test "abiflags-strip5-ph" $o32flagslist
+run_dump_test "abiflags-strip6-ph" $o32flagslist
+run_dump_test "abiflags-strip7-ph" $o32flagslist
+run_dump_test "abiflags-strip8-ph" $o32flagslist
+run_dump_test "abiflags-strip9-ph" $o32flagslist
 
 run_dump_test "nan-legacy"
 run_dump_test "nan-2008"
-- 
1.9.4

