[PATCH 0/9] PowerPC64 ELFv2 ABI support.
Matt Thomas
matt@3am-software.com
Thu Oct 31 07:50:00 GMT 2013
On Oct 29, 2013, at 7:19 PM, Alan Modra <amodra@gmail.com> wrote:
> This patch series makes the changes necessary in binutils to support
> the updated PowerPC64 ABI, which we're calling ELFv2. Two major
> changes from the previous ABI are
>
> - No function descriptors.
It would be nice if there was a similar ppc32 ABI which would make
sharing code between ppc32 and ppc64 easier.
> The global entry
> point is the address stored in function pointers, and it is a
> requirement that calls to the global entry point have that address
> in r12.
This sounds similar to ABICALLS on mips (where the function pointer
is stored in $25 (t9) upon call entry). That value is used to derive
the $gp value by adding a constant (done by the linker) to the value
in $25. One nice thing about the existing PPC64 ABI is that the toc
pointer is independent of the PC and thus you can the text and
non-text parts of a shareable library in independent parts of the
address space. One shared segment can have all the read-only text
segments and each process can have a private segment with the
read-write segments. If you switch to add value to r12 to get the
toc, you can't share segments anymore.
Unlike ABICALLS, I assume a plt is still used instead of fetching
the address of each function from the GOT and doing an indirect call.
More information about the Binutils
mailing list