RFC: Audit external function called indirectly via GOT
Alan Modra
amodra@gmail.com
Mon Jan 1 00:00:00 GMT 2018
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.
--
Alan Modra
Australia Development Lab, IBM
More information about the Gnu-gabi
mailing list