This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: powerpc new PLT and GOT
- From: Daniel Jacobowitz <drow at false dot org>
- To: binutils at sources dot redhat dot com
- Date: Wed, 11 May 2005 10:22:09 -0400
- Subject: Re: powerpc new PLT and GOT
- References: <20050511141249.GA29302@bubble.grove.modra.org>
On Wed, May 11, 2005 at 11:42:50PM +0930, Alan Modra wrote:
> The current PowerPC ABI requires PLT and GOT to be both writable and
> executable, which is a security concern. It's worse than that actually,
> since the entire data segment ends up executable.
>
> This patch implements binutils support for a new PLT and GOT on PowerPC,
> details of which are in the attached ABI proposal. Note that the
> proposal is by no means final; There's likely to be some change in
> .glink to do without the lwzu instructions, but I think it's solid
> enough to throw some code together. Also, the ld support doesn't allow
> registers other than r30 as a GOT pointer. We'll worry about that if
> and when gcc generates code using a different register.
>
> From a user perspective, this ld change won't do anything until gcc
> starts generating code for the new PLT and GOT. ie. ld will continue to
> link using the old PLT scheme.
I'm not oing to look at the code, but I have one comment on the ABI.
You've got a data section named .plt and a code section named .glink
(well, you note that the text stubs can be anywhere in the text
segment, but that's true on most architectures; I imagine that for now
they're all going in a single .glink section).
Everyone else seems to call the data section ".got.plt" and the text
section ".plt". GDB even knows about this; it uses the name ".plt" to
help in skipping dynamic linker code. Is there a reason why you can't
use the traditional names?
--
Daniel Jacobowitz
CodeSourcery, LLC