Revert "Do not ignore SizeOfOptionalHeader in COFF header even if PE header is not present."

This reverts commit r278066 to unbreak buildbots.

llvm-svn: 278070
This commit is contained in:
Rui Ueyama 2016-08-08 23:07:03 +00:00
parent 072728d419
commit f53c8cb439
1 changed files with 1 additions and 2 deletions

View File

@ -716,10 +716,9 @@ COFFObjectFile::COFFObjectFile(MemoryBufferRef Object, std::error_code &EC)
}
if ((EC = getObject(DataDirectory, Data, DataDirAddr, DataDirSize)))
return;
CurPtr += COFFHeader->SizeOfOptionalHeader;
}
CurPtr += COFFHeader->SizeOfOptionalHeader;
if ((EC = getObject(SectionTable, Data, base() + CurPtr,
(uint64_t)getNumberOfSections() * sizeof(coff_section))))
return;