[Object][XCOFF] Add support for 64-bit file header and section header dumping.
authorSean Fertile <sfertile@ca.ibm.com>
Tue, 9 Jul 2019 18:09:11 +0000 (18:09 +0000)
committerSean Fertile <sfertile@ca.ibm.com>
Tue, 9 Jul 2019 18:09:11 +0000 (18:09 +0000)
commit837ae69f8b9d8fbb0a53b9a58b85496fa1962ba5
tree3715adc7429a350c9cd20013cf9f75f0eb30674d
parent5f4d7c9d4f20f85bbcd814b324aec5f3f2107d26
[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
14 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
llvm/lib/BinaryFormat/Magic.cpp
llvm/lib/Object/Binary.cpp
llvm/lib/Object/ObjectFile.cpp
llvm/lib/Object/SymbolicFile.cpp
llvm/lib/Object/XCOFFObjectFile.cpp
llvm/test/tools/llvm-readobj/Inputs/xcoff-basic-64.o [new file with mode: 0644]
llvm/test/tools/llvm-readobj/xcoff-basic.test
llvm/test/tools/llvm-readobj/xcoff-sections.test [new file with mode: 0644]
llvm/tools/llvm-readobj/XCOFFDumper.cpp
llvm/tools/obj2yaml/xcoff2yaml.cpp