public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Peter Collingbourne <pcc@google.com>
To: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Cc: Jan Beulich <jbeulich@suse.com>, Binutils <binutils@sourceware.org>
Subject: Re: [PATCH 1/4] elf: Add definition for SHT_LLVM_ADDRSIG.
Date: Fri, 27 May 2022 10:28:23 -0700	[thread overview]
Message-ID: <CAMn1gO6LshkJB=7rSNd_iC4ho0ndRfQr1Rm0J+CJUxF4-jnGiw@mail.gmail.com> (raw)
In-Reply-To: <CANqewP055b1Mo=pQ6=-3Tsqi_mxF47TCK80eP65VH=eFbA+d2g@mail.gmail.com>

On Thu, May 26, 2022 at 3:37 AM Tatsuyuki Ishi via Binutils
<binutils@sourceware.org> wrote:
>
> > Values in [..._LOOS,..._HIOS] pertain to particular OSes (i.e.
> > ELFOSABI_* values in the header). LLVM isn't really an OS by itself
> > (and I'm also unaware of ELFOSABI_LLVM existing), so I expect there
> > are certain ELFOSABI_* values to which SHT_LLVM_* apply. Otherwise
> > how are collisions with other OSes' SHT_<OS>_... values avoided?
>
> I'm not a LLVM contributor, but unfortunately it seems like the answer
> is that they do not follow the practice of constraining these values
> based on EI_OSABI, and they are basically treated as same as non-OS
> specific values [1].
>
> [1] https://github.com/llvm/llvm-project/blob/09c2b7c35af8c4bad39f03e9f60df8bd07323028/llvm/lib/Object/ELF.cpp#L232-L307

Hi,

The LLVM section types are in a carveout of the GNU OSABI range, as
previously agreed on the GNU gABI list:
https://sourceware.org/pipermail/gnu-gabi/2017q1/000157.html

If other OSs want to adopt the LLVM section types, they will need to
create the same carveout in their OSABI.

From the GNU binutils perspective, I think these should be treated the
same as the SHT_GNU_* section types. I'm not sure of the reason why
the LLVM ELF parser doesn't consider the OSABI for the GNU/LLVM
section types, but it may just be that there hasn't yet been a need to
do so.

Peter

  reply	other threads:[~2022-05-27 17:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25  6:42 [PATCH 0/4] gas: Add support for LLVM addrsig and addrsig_sym Tatsuyuki Ishi
2022-05-25  6:42 ` [PATCH 1/4] elf: Add definition for SHT_LLVM_ADDRSIG Tatsuyuki Ishi
2022-05-26 10:03   ` Jan Beulich
2022-05-26 10:13     ` Tatsuyuki Ishi
2022-05-26 10:19       ` Jan Beulich
2022-05-26 10:36         ` Tatsuyuki Ishi
2022-05-27 17:28           ` Peter Collingbourne [this message]
2022-05-25  6:42 ` [PATCH 2/4] gas: Add support for LLVM addrsig and addrsig_sym directives on ELF Tatsuyuki Ishi
2022-05-25  7:23   ` Alan Modra
2022-05-25  7:49   ` Jan Beulich
2022-05-25  7:58     ` Tatsuyuki Ishi
2022-05-25  8:07       ` Fangrui Song
2022-05-25  8:34       ` Jan Beulich
2022-05-25  8:41         ` Tatsuyuki Ishi
2022-05-25  6:42 ` [PATCH 3/4] bfd: Output SH_LINK to .symtab for SHT_LLVM_ADDRSIG Tatsuyuki Ishi
2022-05-25  7:46   ` Jan Beulich
2022-05-25  6:42 ` [PATCH 4/4] gas: Add basic test for addrsig Tatsuyuki Ishi
2022-05-25  7:30   ` Alan Modra
2022-05-25  7:19 ` [PATCH 0/4] gas: Add support for LLVM addrsig and addrsig_sym Fangrui Song
2022-05-25  7:34   ` Alan Modra
2022-05-25  7:59     ` Fangrui Song
2022-05-25  8:01     ` Tatsuyuki Ishi

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='CAMn1gO6LshkJB=7rSNd_iC4ho0ndRfQr1Rm0J+CJUxF4-jnGiw@mail.gmail.com' \
    --to=pcc@google.com \
    --cc=binutils@sourceware.org \
    --cc=ishitatsuyuki@gmail.com \
    --cc=jbeulich@suse.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).