diff options
author | Sean Fertile <sfertile@ca.ibm.com> | 2019-07-09 18:09:11 +0000 |
---|---|---|
committer | Sean Fertile <sfertile@ca.ibm.com> | 2019-07-09 18:09:11 +0000 |
commit | 837ae69f8b9d8fbb0a53b9a58b85496fa1962ba5 (patch) | |
tree | 3715adc7429a350c9cd20013cf9f75f0eb30674d /llvm/lib/Object/ObjectFile.cpp | |
parent | 5f4d7c9d4f20f85bbcd814b324aec5f3f2107d26 (diff) | |
download | bcm5719-llvm-837ae69f8b9d8fbb0a53b9a58b85496fa1962ba5.tar.gz bcm5719-llvm-837ae69f8b9d8fbb0a53b9a58b85496fa1962ba5.zip |
[Object][XCOFF] Add support for 64-bit file header and section header dumping.
Adds a readobj dumper for 32-bit and 64-bit section header tables, and extend
support for the file-header dumping to include 64-bit object files. Also
refactors the binary file parsing to be done in a helper function in an attempt
to cleanup error handeling.
Differential Revision: https://reviews.llvm.org/D63843
llvm-svn: 365524
Diffstat (limited to 'llvm/lib/Object/ObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/ObjectFile.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Object/ObjectFile.cpp b/llvm/lib/Object/ObjectFile.cpp index 3744721773f..101f5dcc082 100644 --- a/llvm/lib/Object/ObjectFile.cpp +++ b/llvm/lib/Object/ObjectFile.cpp @@ -150,7 +150,9 @@ ObjectFile::createObjectFile(MemoryBufferRef Object, file_magic Type) { case file_magic::pecoff_executable: return createCOFFObjectFile(Object); case file_magic::xcoff_object_32: - return createXCOFFObjectFile(Object); + return createXCOFFObjectFile(Object, Binary::ID_XCOFF32); + case file_magic::xcoff_object_64: + return createXCOFFObjectFile(Object, Binary::ID_XCOFF64); case file_magic::wasm_object: return createWasmObjectFile(Object); } |