public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@redhat.com>
To: Xi Ruoyao <xry111@xry111.site>, caiyinyu <caiyinyu@loongson.cn>,
	adhemerval.zanella@linaro.org
Cc: i.swmail@xen0n.name, libc-alpha@sourceware.org
Subject: Re: [PATCH] LoongArch: Fix ABI related macros in elf.h to keep consistent with binutils[1].
Date: Mon, 31 Oct 2022 09:12:52 -0400	[thread overview]
Message-ID: <b9d5c5fc-c463-e552-0a20-42eb71359fa6@redhat.com> (raw)
In-Reply-To: <0a618c5f8c1d5a621e157a6167048c102fd8d501.camel@xry111.site>

On 10/31/22 02:34, Xi Ruoyao via Libc-alpha wrote:
> On Mon, 2022-10-31 at 11:43 +0800, caiyinyu wrote:
>> [1]:
>> https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=c4a7e6b56218e1d5a858682186b542e2eae01a4a;hp=0d94a8735055432029237612a6eb9165db1ec9dd
>> [2]:
>> Reference: https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html#_e_flags_identifies_abi_type_and_version
>> ---
>>  elf/elf.h | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/elf/elf.h b/elf/elf.h
>> index 3f08823a30..383eb5fbff 100644
>> --- a/elf/elf.h
>> +++ b/elf/elf.h
>> @@ -4093,8 +4093,10 @@ enum
>>  #define R_NDS32_TLS_DESC       119
>>  
>>  /* LoongArch ELF Flags */
>> -#define EF_LARCH_ABI           0x07

I assume this is a mask for the bits.

>> -#define EF_LARCH_ABI_LP64D     0x03
> 
> Does Glibc API policy allow to remove a macro definition in a public
> header?

If a public glibc release has been made of this header then it is public ABI.

How big is the LoongArch community? You could remove these things if you wanted,
but it is not good for existing source compatibility.
 
>> +#define EF_LOONGARCH_ABI_SOFT_FLOAT     0x1
>> +#define EF_LOONGARCH_ABI_SINGLE_FLOAT   0x2
>> +#define EF_LOONGARCH_ABI_DOUBLE_FLOAT   0x3

Best practice is to keep the old macro names around.

Add the new macro names.

The same value should have the *same* semantics, otherwise it's an ABI break.

>> +#define EF_LOONGARCH_OBJABI_V1          0x40
>>  
>>  /* LoongArch specific dynamic relocations */
>>  #define R_LARCH_NONE           0
> 

-- 
Cheers,
Carlos.


  reply	other threads:[~2022-10-31 13:12 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 [this message]
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

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=b9d5c5fc-c463-e552-0a20-42eb71359fa6@redhat.com \
    --to=carlos@redhat.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=caiyinyu@loongson.cn \
    --cc=i.swmail@xen0n.name \
    --cc=libc-alpha@sourceware.org \
    --cc=xry111@xry111.site \
    /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).