diff options
author | jasonliu <jasonliu.development@gmail.com> | 2020-01-30 15:50:49 +0000 |
---|---|---|
committer | jasonliu <jasonliu.development@gmail.com> | 2020-01-30 15:59:09 +0000 |
commit | 3bbe7a681e0f98182daf268a314d1372073ea019 (patch) | |
tree | 0f69872cdef0b0d8fdbd36cc610af36a81a14b80 /llvm/lib/Object/XCOFFObjectFile.cpp | |
parent | af3d0d16286aecdd19356a3505d4a87f54a2f7e9 (diff) | |
download | llvm-3bbe7a681e0f98182daf268a314d1372073ea019.zip llvm-3bbe7a681e0f98182daf268a314d1372073ea019.tar.gz llvm-3bbe7a681e0f98182daf268a314d1372073ea019.tar.bz2 |
[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
Diffstat (limited to 'llvm/lib/Object/XCOFFObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/XCOFFObjectFile.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Object/XCOFFObjectFile.cpp b/llvm/lib/Object/XCOFFObjectFile.cpp index f98cd69..51fc661 100644 --- a/llvm/lib/Object/XCOFFObjectFile.cpp +++ b/llvm/lib/Object/XCOFFObjectFile.cpp @@ -608,6 +608,7 @@ XCOFFObjectFile::relocations(const XCOFFSectionHeader32 &Sec) const { uint32_t NumRelocEntries = NumRelocEntriesOrErr.get(); + assert(sizeof(XCOFFRelocation32) == XCOFF::RelocationSerializationSize32); auto RelocationOrErr = getObject<XCOFFRelocation32>(Data, reinterpret_cast<void *>(RelocAddr), NumRelocEntries * sizeof(XCOFFRelocation32)); |