readobj: Dump PE/COFF optional records.

These records are mandatory for executables and are used by the loader.

Reviewers: rafael

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D939

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183852 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rui Ueyama
2013-06-12 19:10:33 +00:00
parent 100fbdd06b
commit 4bf771b4e6
8 changed files with 201 additions and 52 deletions

View File

@@ -229,7 +229,7 @@ static void printCOFFSymbolAddress(llvm::raw_ostream &Out,
void llvm::printCOFFUnwindInfo(const COFFObjectFile *Obj) {
const coff_file_header *Header;
if (error(Obj->getHeader(Header))) return;
if (error(Obj->getCOFFHeader(Header))) return;
if (Header->Machine != COFF::IMAGE_FILE_MACHINE_AMD64) {
errs() << "Unsupported image machine type "