[llvm-commits] [PATCH 7/10] Initial TOC support for PowerPC64 object creation

Adhemerval Zanella azanella at linux.vnet.ibm.com
Mon Sep 17 13:20:49 PDT 2012


This is a initial PPC64 TOC MC using the small mcmodel (a single 64K TOC). I follow
the special function ARM put in MCStreamer to add the 'EmitTCEntry'. This is to 
put specialized function for ASM and object creation.

The patch also adds initial TOC relocations (R_PPC64_TOC, R_PPC64_TOC16 and R_PPC64_TOC16DS).

The modification on 'MCELFObjectTargetWriter' (CheckRelocationUndefined) is meant to
avoid the creation of an unreferenced ".TOC." symbol (used in the .odp creation) as well
to set the R_PPC64_TOC relocation target as the temporary ".TOC." symbol. On PPC64 ABI, the
R_PPC64_TOC relocation should not point to any symbol.

Finally it also adds a testcase for object and relocation creation. As pointed in the
testcase itself, I had to use a .ll file because the PPC64 ASM parse is not fully
functional yet.

-- 
Adhemerval Zanella Netto
  Software Engineer
  Linux Technology Center Brazil
  Toolchain / GLIBC on Power Architecture
  azanella at linux.vnet.ibm.com / azanella at br.ibm.com
  +55 61 8642-9890

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-Initial-TOC-support-for-PowerPC64-object-creation.patch
Type: text/x-patch
Size: 23090 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120917/f7c6f081/attachment.bin>


More information about the llvm-commits mailing list