From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31]) by sourceware.org (Postfix) with ESMTPS id E7C153858D3C for ; Wed, 2 Nov 2022 06:19:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E7C153858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=xen0n.name Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xen0n.name DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xen0n.name; s=mail; t=1667369989; bh=QumxX56PWL3GtEgl8i6eb5gPDYxWKBmybDgCRNrjDb0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=nPg+xYi6fHFCbCBHMNmIA5/cOP1Ny0ZWv6YKBF4k/5kMqG1td7rEcCxg5mZ/IY0zh R8OcBUNF6U3fBD+HhfYphQKviXLH87YqAnj0ox1L5uEqYAV6r3DY1b3aM2+XKPERbo z59EOZhoUPPl776LXuMEO5vlPkKGVCh5fv83gfZQ= Received: from [100.100.57.122] (unknown [220.248.53.61]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailbox.box.xen0n.name (Postfix) with ESMTPSA id 67C8C6011C; Wed, 2 Nov 2022 14:19:49 +0800 (CST) Message-ID: Date: Wed, 2 Nov 2022 14:19:48 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:108.0) Gecko/20100101 Thunderbird/108.0a1 Subject: Re: [PATCH] LoongArch: Fix ABI related macros in elf.h to keep consistent with binutils[1]. Content-Language: en-US To: caiyinyu , Xi Ruoyao , Carlos O'Donell , adhemerval.zanella@linaro.org Cc: i.swmail@xen0n.name, libc-alpha@sourceware.org References: <20221031034334.3027740-1-caiyinyu@loongson.cn> <0a618c5f8c1d5a621e157a6167048c102fd8d501.camel@xry111.site> <51360f07-4965-c6f7-8e30-160c8e6880f7@loongson.cn> From: WANG Xuerui In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham 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 2022/11/2 14:13, caiyinyu wrote: > > 在 2022/11/1 上午10:14, Xi Ruoyao 写道: >> On Tue, 2022-11-01 at 10:02 +0800, caiyinyu wrote: >> >>> diff --git a/elf/elf.h b/elf/elf.h >>> >>> index 3f08823a30..d51eb75a73 100644 >>> --- a/elf/elf.h >>> +++ b/elf/elf.h >>> @@ -4093,8 +4093,11 @@ enum >>>    #define R_NDS32_TLS_DESC       119 >>> >>>    /* LoongArch ELF Flags */ >>> -#define EF_LARCH_ABI           0x07 >>> -#define EF_LARCH_ABI_LP64D     0x03 >>> +#define EF_LOONGARCH_ABI_MODIFIER_MASK 0x07 >>> +#define EF_LOONGARCH_ABI_SOFT_FLOAT     0x01 >>> +#define EF_LOONGARCH_ABI_SINGLE_FLOAT   0x02 >>> +#define EF_LOONGARCH_ABI_DOUBLE_FLOAT   0x03 >>> +#define EF_LOONGARCH_OBJABI_V1          0x40 >> Again, is "LARCH" -> "LOONGARCH" change intentional?  The ABI doc does >> not specified the name of these macros...  And we already have R_LARCH_* >> so the difference of "LARCH" and "LOONGARCH" seems puzzling. > > We will use *LARCH* to keep consistent in glibc and binutils like > other arches Unfortunately it's EF_LOONGARCH_xxx in binutils from day one [1]... BTW the inconsistency is also present from day one. [1]: https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=include/elf/loongarch.h;h=a6341b46791d3f820f6e120cdc82ca30020ca7ab;hb=HEAD > >> And is it an option to keep old names there with a warning? >> >> #define EF_LARCH_ABI_LP64D __glibc_macro_warning ("EF_LARCH_ABI_LP64D >> is deprecated") 0x03 >> > I tend to remove it now. > While there's very few LoongArch users running fully open-source systems (most of them instead running the so-called old world distros which are all more or less commercial distros), deprecating for one release might be better, although just removing wouldn't cause much harm either. The current user base of "new world" LoongArch distros are mostly devs or power users so they know what to expect.