The following six patches correspond to patches posted to the libffi mailing list a few days ago to add support for PowerPC64 ELFv2. The patch series has been tested on powerpc-linux, powerpc64-linux, powerpc64le-linux and powerpc-freebsd by running the libffi testsuite, and on powerpc64-linux and powerpc64le-linux by gcc bootstrap and regression testing. I guess the normal procedure would be to wait for upstream approval before applying here, but since Uli's gcc support for ELFv2 is in, it would be nice to have a working libffi along with that.
-- Alan Modra Australia Development Lab, IBM