[XCOFF] Add functionality for parsing AIX XCOFF object file headers
authorHubert Tong <hubert.reinterpretcast@gmail.com>
Thu, 4 Apr 2019 00:53:21 +0000 (00:53 +0000)
committerHubert Tong <hubert.reinterpretcast@gmail.com>
Thu, 4 Apr 2019 00:53:21 +0000 (00:53 +0000)
commitab2eb2bfacb4b2a3642e7716ddaf2638149aa0b4
tree08b208b82c24c6722d0288752c5703ba06c4e86a
parent7f8b3bf2475624c4bd1140a4b48c83b738ddd0ec
[XCOFF] Add functionality for parsing AIX XCOFF object file headers

Summary:
1. Add functionality for parsing AIX XCOFF object files headers.
2. Only support 32-bit AIX XCOFF object files in this patch.
3. Print out the AIX XCOFF object file header in YAML format.

Reviewers: sfertile, hubert.reinterpretcast, jasonliu, mstorsjo, zturner, rnk

Reviewed By: sfertile, hubert.reinterpretcast

Subscribers: jsji, mgorny, hiraditya, jdoerfert, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59419

Patch by Digger Lin

llvm-svn: 357663
21 files changed:
llvm/include/llvm/BinaryFormat/Magic.h
llvm/include/llvm/Object/Binary.h
llvm/include/llvm/Object/ObjectFile.h
llvm/include/llvm/Object/XCOFFObjectFile.h [new file with mode: 0644]
llvm/include/llvm/ObjectYAML/XCOFFYAML.h [new file with mode: 0644]
llvm/lib/BinaryFormat/Magic.cpp
llvm/lib/Object/Binary.cpp
llvm/lib/Object/CMakeLists.txt
llvm/lib/Object/ObjectFile.cpp
llvm/lib/Object/SymbolicFile.cpp
llvm/lib/Object/XCOFFObjectFile.cpp [new file with mode: 0644]
llvm/lib/ObjectYAML/CMakeLists.txt
llvm/lib/ObjectYAML/XCOFFYAML.cpp [new file with mode: 0644]
llvm/test/tools/obj2yaml/Inputs/aix_xcoff.o [new file with mode: 0644]
llvm/test/tools/obj2yaml/Inputs/aix_xcoff_truncated_file_header.o [new file with mode: 0644]
llvm/test/tools/obj2yaml/aix_xcoff.test [new file with mode: 0644]
llvm/test/tools/obj2yaml/aix_xcoff_truncated_file_header.test [new file with mode: 0644]
llvm/tools/obj2yaml/CMakeLists.txt
llvm/tools/obj2yaml/obj2yaml.cpp
llvm/tools/obj2yaml/obj2yaml.h
llvm/tools/obj2yaml/xcoff2yaml.cpp [new file with mode: 0644]