[XCOFF][AIX] Support basic relocation type on AIX
authorjasonliu <jasonliu.development@gmail.com>
Thu, 30 Jan 2020 15:50:49 +0000 (15:50 +0000)
committerjasonliu <jasonliu.development@gmail.com>
Thu, 30 Jan 2020 15:59:09 +0000 (15:59 +0000)
commit3bbe7a681e0f98182daf268a314d1372073ea019
tree0f69872cdef0b0d8fdbd36cc610af36a81a14b80
parentaf3d0d16286aecdd19356a3505d4a87f54a2f7e9
[XCOFF][AIX] Support basic relocation type on AIX

Summary:

This patch intends to support three most common relocation type
on AIX: R_POS, R_TOC, R_RBR.
These three relocation type will be needed for object file generation
on AIX for small code model.
We will have follow up patches to bring relocation support for
large code model on AIX.

Reviewers: hubert.reinterpretcast, daltenty, DiggerLin

Differential Revision: https://reviews.llvm.org/D72027
llvm/include/llvm/BinaryFormat/XCOFF.h
llvm/include/llvm/MC/MCXCOFFObjectWriter.h
llvm/lib/MC/MCXCOFFStreamer.cpp
llvm/lib/MC/XCOFFObjectWriter.cpp
llvm/lib/Object/XCOFFObjectFile.cpp
llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFObjectWriter.cpp
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
llvm/test/CodeGen/PowerPC/aix-user-defined-memcpy.ll
llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll [new file with mode: 0644]