public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Fangrui Song <i@maskray.me>
To: Florian Weimer <fweimer@redhat.com>
Cc: "H.J. Lu" <hjl.tools@gmail.com>,
	Binutils <binutils@sourceware.org>,
	Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>,
	Marcus Shawcroft <marcus.shawcroft@arm.com>,
	Richard Earnshaw <rearnsha@arm.com>
Subject: Re: [PATCH v2 0/2] elf: Implement indirect external access marker
Date: Thu, 8 Jul 2021 20:25:59 -0700	[thread overview]
Message-ID: <20210709032559.bjedieqrjjtwwovx@gmail.com> (raw)
In-Reply-To: <87tul65hcw.fsf@oldenburg.str.redhat.com>

On 2021-07-07, Florian Weimer via Binutils wrote:
>* H. J. Lu:
>
>> On Wed, Jul 7, 2021 at 7:01 AM Florian Weimer <fweimer@redhat.com> wrote:
>>>
>>> * H. J. Lu:
>>>
>>> > I am checking in this patch by the end of this week.
>>>
>>> Shouldn't the ABI specification be finalized first?  (Sorry.)
>>>
>>
>> Did you mean adding GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS?
>> I have submitted linker, GCC and glibc patches to show how it is used.
>>
>> To see how it works, we need to start with a working linker.  That is
>> why I want to add it to the linker now.
>
>Hmm, I see.  I guess it's up to the binutils maintainers to decide.
>
>Thanks,
>Florian
>

Seems that the motivation is GNU ld internals
https://sourceware.org/pipermail/binutils/2021-June/117132.html
If so, I am fine with this GNU property (but I will not recommend it within llvm-project).

---

I hope glibc's diagnostic on "rejecting copy relocations on protected data symbol"
can be unconditional, not check this GNU property.

Here https://lists.llvm.org/pipermail/llvm-dev/2021-June/151248.html 
I investigated many binutils versions (2.11, 2.16, 2.20, 2.24, 2.35).
They have the same diagnostic

   relocation R_X86_64_PC32 against protected function `addr' can not be used when making a shared object

for

   // protected data is similar
   __attribute__((visibility("protected"))) void *addr() { return (void*)addr; }

so we should just assume protected definitions never works and don't
bother with gnu property complexity in glibc.

      parent reply	other threads:[~2021-07-09  3:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22 23:57 H.J. Lu
2021-06-22 23:57 ` [PATCH v2 1/2] elf: Add GNU_PROPERTY_1_NEEDED H.J. Lu
2021-06-22 23:57 ` [PATCH v2 2/2] elf: Add GNU_PROPERTY_1_NEEDED check H.J. Lu
2021-07-07 13:58 ` [PATCH v2 0/2] elf: Implement indirect external access marker H.J. Lu
2021-07-07 14:00   ` Florian Weimer
2021-07-07 14:13     ` H.J. Lu
2021-07-07 14:27       ` Florian Weimer
2021-07-09  0:56         ` Alan Modra
2021-07-09  1:11           ` H.J. Lu
2021-07-09  2:36             ` Alan Modra
2021-07-09  3:16               ` H.J. Lu
2021-07-09  3:25         ` Fangrui Song [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=20210709032559.bjedieqrjjtwwovx@gmail.com \
    --to=i@maskray.me \
    --cc=binutils@sourceware.org \
    --cc=fweimer@redhat.com \
    --cc=hjl.tools@gmail.com \
    --cc=marcus.shawcroft@arm.com \
    --cc=ramana.radhakrishnan@arm.com \
    --cc=rearnsha@arm.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).