This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH 0/9] PowerPC64 ELFv2 ABI support.
- From: Matt Thomas <matt at 3am-software dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 31 Oct 2013 00:49:58 -0700
- Subject: Re: [PATCH 0/9] PowerPC64 ELFv2 ABI support.
- Authentication-results: sourceware.org; auth=none
- References: <20131030021905 dot GC20756 at bubble dot grove dot modra dot org>
On Oct 29, 2013, at 7:19 PM, Alan Modra <firstname.lastname@example.org> 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.