public inbox for gnu-gabi@sourceware.org
 help / color / mirror / Atom feed
From: Fangrui Song <maskray@google.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: GNU gABI gnu-gabi <gnu-gabi@sourceware.org>,
	GCC Development <gcc@gcc.gnu.org>,
	Binutils <binutils@sourceware.org>,
	GNU C Library <libc-alpha@sourceware.org>,
	llvm-dev@lists.llvm.org
Subject: Re: [llvm-dev] RFC: Add GNU_PROPERTY_UINT32_AND_XXX/GNU_PROPERTY_UINT32_OR_XXX
Date: Thu, 17 Jun 2021 12:38:25 -0700	[thread overview]
Message-ID: <20210617193825.zzjyoybttajksw5x@google.com> (raw)
In-Reply-To: <CAMe9rOpNj34non3tvc00H5msENoQu2igspR_OafyZon049gg-w@mail.gmail.com>

On 2021-06-17, H.J. Lu via llvm-dev wrote:
>On Thu, Jan 21, 2021 at 7:02 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>>
>> On Wed, Jan 13, 2021 at 9:06 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>> >
>> > 1. GNU_PROPERTY_UINT32_AND_LO..GNU_PROPERTY_UINT32_AND_HI
>> >
>> >  #define GNU_PROPERTY_UINT32_AND_LO 0xb0000000
>> >  #define GNU_PROPERTY_UINT32_AND_HI 0xb0007fff
>> >
>> > A bit in the output pr_data field is set only if it is set in all
>> > relocatable input pr_data fields.  If all bits in the the output
>> > pr_data field are zero, this property should be removed from output.
>> >
>> > If the bit is 1, all input relocatables have the feature.  If the
>> > bit is 0 or the property is missing, the info is unknown.

How to use AND in practice?
Are you going to add .note.gnu.property to all of crt1.o crti.o
crtbegin.o crtend.o crtn.o and miscellaneous libc_nonshared.a object
files written in assembly?

>> > 2. GNU_PROPERTY_UINT32_OR_LO..GNU_PROPERTY_UINT32_OR_HI
>> >
>> >  #define GNU_PROPERTY_UINT32_OR_LO 0xb0008000
>> >  #define GNU_PROPERTY_UINT32_OR_HI 0xb000ffff
>> >
>> > A bit in the output pr_data field is set if it is set in any
>> > relocatable input pr_data fields. If all bits in the the output
>> > pr_data field are zero, this property should be removed from output.
>> >
>> > If the bit is 1, some input relocatables have the feature.  If the
>> > bit is 0 or the property is missing, the info is unknown.
>> >
>> > The PDF is at
>> >
>> > https://gitlab.com/x86-psABIs/Linux-ABI/-/wikis/uploads/0690db0a3b7e5d8a44e0271a4be54aa7/linux-gABI-and-or-2021-01-13.pdf
>> >
>> > --
>> > H.J.
>>
>> Here is the binutils patch to implement it.
>>
>
>If there are no objections, I will check it in tomorrow.

If the use case is just ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA, it'd be
very kind of you if you can collect more use cases before generalizing
this into a non-arch-specific GNU PROPERTY.

The "copy relocations on protected data symbols" thing is x86 specific
and only applies with gcc+GNU ld+glibc.
Non-x86 architectures don't have this thing.
gold doesn't have this thing.
clang doesn't have this thing.

  reply	other threads:[~2021-06-17 19:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 17:06 H.J. Lu
2021-01-21 15:02 ` H.J. Lu
2021-01-21 21:42   ` Fangrui Song
2021-04-17 12:48     ` H.J. Lu
2021-04-17 18:25       ` Fangrui Song
2021-04-17 19:05         ` H.J. Lu
2021-06-17 18:59   ` H.J. Lu
2021-06-17 19:38     ` Fangrui Song [this message]
2021-06-17 19:45       ` [llvm-dev] " H.J. Lu
2021-06-17 20:25         ` Fāng-ruì Sòng
2021-06-17 23:01           ` H.J. Lu
2021-06-18  0:06             ` Fāng-ruì Sòng
2021-06-18  0:24               ` H.J. Lu
2021-06-18  0:49                 ` Fāng-ruì Sòng
2021-06-18  2:40                   ` H.J. Lu
2021-06-21 14:35                     ` Michael Matz
2021-06-22 14:30                       ` H.J. Lu
2021-06-22 14:54                         ` Michael Matz
2021-06-18  2:45                   ` H.J. Lu
2021-06-18 15:38 ` RFC: Add GNU_PROPERTY_1_NEEDED H.J. Lu
2021-06-18 21:34   ` [llvm-dev] " Fangrui Song
2021-06-19  1:09     ` H.J. Lu

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=20210617193825.zzjyoybttajksw5x@google.com \
    --to=maskray@google.com \
    --cc=binutils@sourceware.org \
    --cc=gcc@gcc.gnu.org \
    --cc=gnu-gabi@sourceware.org \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=llvm-dev@lists.llvm.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).