From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by sourceware.org (Postfix) with ESMTP id A03BE3858D3C for ; Fri, 21 Jul 2023 11:54:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A03BE3858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=orcam.me.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=orcam.me.uk Received: by angie.orcam.me.uk (Postfix, from userid 500) id D9E2292009C; Fri, 21 Jul 2023 13:54:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id D44EA92009B; Fri, 21 Jul 2023 12:54:37 +0100 (BST) Date: Fri, 21 Jul 2023 12:54:37 +0100 (BST) From: "Maciej W. Rozycki" To: YunQiang Su cc: Richard Sandiford , Nick Clifton , YunQiang Su , binutils@sourceware.org, xry111@xry111.site, jiaxun.yang@flygoat.com Subject: Re: [PATCH v4 1/2] MIPS: support mips*64 as CPU and gnuabi64 as ABI In-Reply-To: Message-ID: References: <20230414072046.1639896-1-yunqiang.su@cipunited.com> <20230418140019.2195551-1-yunqiang.su@cipunited.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1161.9 required=5.0 tests=BAYES_00,BODY_8BITS,KAM_DMARC_STATUS,KAM_INFOUSMEBIZ,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, 21 Jul 2023, YunQiang Su wrote: > Maciej W. Rozycki 于2023年7月21日周五 18:01写道: > > > > Nick, please hold on with 2.41 until this incompatible ABI change has been > > sorted. > > > > On Wed, 19 Apr 2023, Richard Sandiford wrote: > > > > > > For MIPS64r6 ports, Debian as an example, `mipsisa64r6el` is > > > > used as the cpu name in triple. > > > > Let's recognize them by `mips*64*(el)`. > > > > > > > > For 64bit Ports, like Debian's mips64el and mips64r6el ports, > > > > `gnuabi64` is used as the abi section. > > > > Let's use N64 abi by default for the triple with gnuabi64. > > > > --- > > > > bfd/config.bfd | 14 ++++++++++++-- > > > > .../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, 45 insertions(+), 6 deletions(-) > > > > > > OK, thanks. > > > > So this has changed the default ABI from o32 to n32 for `mipsisa64-*-*' > > I think that maybe you have a misunderstanding. > 1. It is *not* for `mipsisa64-*-*', it is for `mipsisa64-*-gnuabi64' > 2. It is not from O32 to N32. It is from N32 to N64. Well test results say otherwise. Please build yourself binutils for `mipsisa64-linux' and see what output format it uses with and without this change. I have: $ mipsisa64-linux/gas/as-new /dev/null -o null.o $ file null.o null.o: ELF 32-bit MSB relocatable, MIPS, MIPS64 version 1 (SYSV), not stripped $ mipsisa64-linux/ld/ld-new -e 0 null.o -o null $ file null null: ELF 32-bit MSB executable, MIPS, MIPS64 version 1 (SYSV), statically linked, not stripped $ as at commit 32f1c80375eb^, and: $ mipsisa64-linux/gas/as-new /dev/null -o null.o $ file null.o null.o: ELF 32-bit MSB relocatable, MIPS, MIPS64 version 1 (SYSV), not stripped $ mipsisa64-linux/ld/ld-new -e 0 null.o -o null mipsisa64-linux/ld/ld-new: null.o: ABI is incompatible with that of the selected emulation mipsisa64-linux/ld/ld-new: failed to merge target specific data of file null.o $ as from commit 32f1c80375eb. The default format used by LD is now not the same as one produced by GAS. Maciej