public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: WANG Xuerui <i.swmail@xen0n.name>,
	caiyinyu <caiyinyu@loongson.cn>,
	 Carlos O'Donell <carlos@redhat.com>,
	adhemerval.zanella@linaro.org
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] LoongArch: Fix ABI related macros in elf.h to keep consistent with binutils[1].
Date: Wed, 02 Nov 2022 18:41:36 +0800	[thread overview]
Message-ID: <7dac12df4cc8c122bae328d681a4b353a1003693.camel@xry111.site> (raw)
In-Reply-To: <f2111385-6f83-aa50-18f1-6d6061970596@xen0n.name>

On Wed, 2022-11-02 at 14:19 +0800, WANG Xuerui wrote:
> 
> 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

Fortunately EF_LOONGARCH_xxx in binutils are not a part of the public
API of libbfd (i. e. include/elf/loongarch.h is not installed).  So I
think we should use EF_LARCH_* instead of EF_LOONGARCH_* in every public
interface.  And we can "fix" binutils later.

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

I don't have a strong opinion.  If you insist to remove it now I won't
object.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

      reply	other threads:[~2022-11-02 10:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-31  3:43 caiyinyu
2022-10-31  6:34 ` Xi Ruoyao
2022-10-31 13:12   ` Carlos O'Donell
2022-11-01  2:00     ` Xi Ruoyao
2022-11-01  2:02     ` caiyinyu
2022-11-01  2:14       ` Xi Ruoyao
2022-11-02  6:13         ` caiyinyu
2022-11-02  6:19           ` WANG Xuerui
2022-11-02 10:41             ` Xi Ruoyao [this message]

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=7dac12df4cc8c122bae328d681a4b353a1003693.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=adhemerval.zanella@linaro.org \
    --cc=caiyinyu@loongson.cn \
    --cc=carlos@redhat.com \
    --cc=i.swmail@xen0n.name \
    --cc=libc-alpha@sourceware.org \
    /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).