public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: binutils@sourceware.org,  Alan Modra <amodra@gmail.com>,
	 Nick Clifton <nickc@redhat.com>,
	 Richard Earnshaw <rearnsha@arm.com>
Subject: Re: [PATCH v3 2/2] elf: Add GNU_PROPERTY_1_NEEDED check
Date: Fri, 25 Jun 2021 16:10:48 +0200	[thread overview]
Message-ID: <87o8bu826v.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20210624132411.1993105-3-hjl.tools@gmail.com> (H. J. Lu's message of "Thu, 24 Jun 2021 06:24:11 -0700")

* H. J. Lu:

> If GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS is set on any input
> relocatable files:
>
> 1. Don't generate copy relocations.
> 2. Turn off extern_protected_data since it implies
> GNU_PROPERTY_NO_COPY_ON_PROTECTED.
> 3. Treate reference to protected symbols with indirect external access
> as local.
> 4. Set GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS on output.
> 5. When generating executable, clear this bit when there are non-GOT or
> non-PLT relocations in input relocatable files without the bit set.
> 6. Add -z [no]indirect-extern-access to control indirect external access.

Should the property be used just for error checking?  We would flip the
default unconditionally.  Such a behavioral change simply based on some
input file is quite surprising.

For (4), I think we need to set a different flag (or perhaps even
flags), and be really careful about what we do.  I think an output file
that is an executable will never require indirect-extern-access, but it
can be incompatible with indirect-extern-access objects at run time.
Shared objects as output files may themselves depend on
indirect-extern-access objects at run time.  Ideally, markup would be
applied to the relocations that are affected by the changes in the ABI.

Thanks,
Florian


  reply	other threads:[~2021-06-25 14:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-24 13:24 [PATCH v3 0/2] elf: Implement indirect external access marker H.J. Lu
2021-06-24 13:24 ` [PATCH v3 1/2] elf: Add GNU_PROPERTY_1_NEEDED H.J. Lu
2021-06-24 13:24 ` [PATCH v3 2/2] elf: Add GNU_PROPERTY_1_NEEDED check H.J. Lu
2021-06-25 14:10   ` Florian Weimer [this message]
2021-06-25 18:52     ` H.J. Lu
2021-06-28  8:46       ` Florian Weimer
2021-06-28 11:55         ` H.J. Lu
2021-07-08  7:27           ` Florian Weimer
2021-07-08 12:26             ` 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=87o8bu826v.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=hjl.tools@gmail.com \
    --cc=nickc@redhat.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).