From: "H.J. Lu" <hjl.tools@gmail.com>
To: Generic System V Application Binary Interface
<generic-abi@googlegroups.com>
Cc: "Carlos O'Donell" <carlos@redhat.com>, gnu-gabi@sourceware.org
Subject: Re: RFC: Audit external function called indirectly via GOT
Date: Mon, 01 Jan 2018 00:00:00 -0000 [thread overview]
Message-ID: <CAMe9rOrtf-ma=a4=HHxg1OqucUR5V_n6=6Uci2ntpDJKVrjfHg@mail.gmail.com> (raw)
In-Reply-To: <20180322122957.GQ3812@bubble.grove.modra.org>
On Thu, Mar 22, 2018 at 5:29 AM, Alan Modra <amodra@gmail.com> wrote:
> On Wed, Mar 21, 2018 at 10:15:26PM -0700, Cary Coutant wrote:
>> If you get rid of the GOT entry, and have the point of call jump
>> indirectly through the PLTGOT entry, which is initialized to point to
>> part (b) of the PLT entry, everything should work the same as without
>> -fno-plt. Essentially, all -fno-plt would do is inline part (a) of the
>> PLT entry.
>>
>> -cary
>>
>> * I'm using parts (a) and (b) to refer to the two parts of a PLT
>> entry: (a) an indirect jump via the PLTGOT entry, and (b) code that
>> jumps to the lazy binding routine, passing the JUMP_SLOT index.
>
> Yes, that essentially is what I've done for -fno-plt on powerpc.
> The call stub code is inlined while the rest of the PLT is more or
> less unchanged. So you get all of the usual lazy-binding features
> by default, and can use "-z now -z relro" if you want a read-only
> PLT.
>
On x86, PLT is always read-only. The issue is the writable PLTGOT.
On x86, -fno-plt removes the writable PLTGOT. My proposal puts
back the writable PLTGOT which is only used for LD_AUDIT.
--
H.J.
next prev parent reply other threads:[~2018-03-22 12:39 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-01 0:00 H.J. Lu
2018-01-01 0:00 ` Cary Coutant
2018-01-01 0:00 ` Carlos O'Donell
2018-01-01 0:00 ` Cary Coutant
2018-01-01 0:00 ` H.J. Lu
2018-01-01 0:00 ` Cary Coutant
2018-01-01 0:00 ` H.J. Lu
2018-01-01 0:00 ` Cary Coutant
2018-01-01 0:00 ` Alan Modra
2018-01-01 0:00 ` H.J. Lu [this message]
2018-01-01 0:00 ` Alan Modra
2018-01-01 0:00 ` H.J. Lu
2018-01-01 0:00 ` Florian Weimer
2018-01-01 0:00 ` H.J. Lu
2018-01-01 0:00 ` Florian Weimer
2018-01-01 0:00 ` Carlos O'Donell
2018-01-01 0:00 ` Florian Weimer
2018-01-01 0:00 ` Carlos O'Donell
2018-01-01 0:00 ` Florian Weimer
2018-01-01 0:00 ` H.J. Lu
2018-01-01 0:00 ` Florian Weimer
2018-01-01 0:00 ` H.J. Lu
2018-01-01 0:00 ` H.J. Lu
2018-01-01 0:00 ` Carlos O'Donell
2018-01-01 0:00 ` Cary Coutant
2018-01-01 0:00 ` H.J. Lu
2018-01-01 0:00 ` Cary Coutant
2018-01-01 0:00 ` H.J. Lu
2018-01-01 0:00 ` Cary Coutant
2018-01-01 0:00 ` H.J. Lu
2018-01-01 0:00 ` Florian Weimer
2018-01-01 0:00 ` H.J. Lu
2018-01-01 0:00 ` Florian Weimer
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='CAMe9rOrtf-ma=a4=HHxg1OqucUR5V_n6=6Uci2ntpDJKVrjfHg@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=carlos@redhat.com \
--cc=generic-abi@googlegroups.com \
--cc=gnu-gabi@sourceware.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).