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/BinaryFormat | |
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/BinaryFormat')
-rw-r--r-- | llvm/lib/BinaryFormat/Magic.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/BinaryFormat/Magic.cpp b/llvm/lib/BinaryFormat/Magic.cpp index 6063187a546..7dfe23690a5 100644 --- a/llvm/lib/BinaryFormat/Magic.cpp +++ b/llvm/lib/BinaryFormat/Magic.cpp @@ -66,6 +66,8 @@ file_magic llvm::identify_magic(StringRef Magic) { // XCOFF format if (startswith(Magic, "\x01\xDF")) return file_magic::xcoff_object_32; + if (startswith(Magic, "\x01\xF7")) + return file_magic::xcoff_object_64; break; case 0xDE: // 0x0B17C0DE = BC wraper |