public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Szabolcs Nagy <szabolcs.nagy@arm.com>
To: Carlos O'Donell <carlos@redhat.com>,
	"H.J. Lu" <hjl.tools@gmail.com>, <binutils@sourceware.org>,
	GNU C Library <libc-alpha@sourceware.org>
Cc: <nd@arm.com>
Subject: Re: [PATCH] x86: Generate PLT relocations for -z now
Date: Tue, 09 May 2017 14:55:00 -0000	[thread overview]
Message-ID: <5911D84A.6050607@arm.com> (raw)
In-Reply-To: <4867456b-ccf6-11fc-55b3-0e914a8c09c3@redhat.com>

On 09/05/17 15:24, Carlos O'Donell wrote:
> On 05/08/2017 04:21 PM, H.J. Lu wrote:
>>
>> This patch partially reverses:
>>
>> commit 25070364b0ce33eed46aa5d78ebebbec6accec7e
>> Author: H.J. Lu <hjl.tools@gmail.com>
>> Date:   Sat May 16 07:00:21 2015 -0700
>>
>>     Don't generate PLT relocations for now binding
>>
>> to support LD_AUDIT and LD_PROFILE with -z now.  If there is an existing
>> GOT relocation, it is still used to avoid PLT relocation against the same
>> function symbol.
>>
>> Any comments?
> I'm testing this on x86_64 locally to make sure it meets the needs of the
> Fedora and Red Hat users that are actively making use of LD_AUDIT.
> 
> Thanks for looking into this and supporting developer tooling that works
> in binutils 2.25, but broke in 2.26 and onwards.
> 

i don't think plt should be considered to be part of the dso abi,
so removing plt relocs should be safe (making a GOT-indirect call
is a valid optimization, since plt is only there for lazy binding
which is an optimization too, gcc can change plt relocs to noplt
ones without -fno-plt so relying on it was never safe).

Alexander Monakov pointed out to me that ld audit could be fixed
in principle to work with GOT-indirect calls e.g. by generating
its entry point trampolines on the fly.

  reply	other threads:[~2017-05-09 14:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-08 20:21 H.J. Lu
2017-05-09 14:24 ` Carlos O'Donell
2017-05-09 14:55   ` Szabolcs Nagy [this message]
2017-05-10 12:03     ` Florian Weimer
2017-05-11  2:31     ` Carlos O'Donell
2017-05-11  3:44 ` Carlos O'Donell
2017-05-11  9:41   ` Szabolcs Nagy
2017-05-11 14:51     ` H.J. Lu
2017-05-11 16:44       ` Carlos O'Donell
2017-05-11 17:09         ` H.J. Lu
2017-05-11 17:33           ` Carlos O'Donell
2017-05-11 18:38             ` H.J. Lu
2017-05-11 17:25     ` Carlos O'Donell

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=5911D84A.6050607@arm.com \
    --to=szabolcs.nagy@arm.com \
    --cc=binutils@sourceware.org \
    --cc=carlos@redhat.com \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=nd@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).