public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@orcam.me.uk>
To: Nick Clifton <nickc@redhat.com>
Cc: YunQiang Su <yunqiang.su@cipunited.com>, binutils@sourceware.org
Subject: [committed 05/16] MIPS/LD/testsuite: Fix JALR relaxation test failure with IRIX 6
Date: Fri, 28 Jul 2023 06:06:51 +0100 (BST)	[thread overview]
Message-ID: <alpine.DEB.2.21.2307271630000.10240@angie.orcam.me.uk> (raw)
In-Reply-To: <alpine.DEB.2.21.2307271457290.10240@angie.orcam.me.uk>

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

  parent reply	other threads:[~2023-07-28  5:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Maciej W. Rozycki [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.2307271630000.10240@angie.orcam.me.uk \
    --to=macro@orcam.me.uk \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    --cc=yunqiang.su@cipunited.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).