[PATCH] 32-bit PowerPC ELF Position Independent Code

Justin Hibbits chmeeedalf at gmail.com
Fri Jul 11 17:54:08 PDT 2014


Hi,

For the last few weeks I've been working off and on with ppc32 PIC for
ELF/SysVR4, and now have something to show for it.  The patch is
attached.  It passes all existing tests, and I haven't yet added new
tests for this.  I also tested by compiling zlib on FreeBSD/PowerPC,
and running some commands linked against it.

Differences from GCC:

* GCC sets aside r30 as the PIC register, this will use any available
  register.
* GNU AS writes a real difference to the function pre-word, whereas the
  LLVM assembler writes 0, with a relocation.  This appears to be
  irrelevant, as it works correctly in my test case.

- Justin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ppc32pic_jul10.diff
Type: text/x-patch
Size: 22205 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140711/a2e2600b/attachment.bin>


More information about the llvm-commits mailing list