[PECOFF] Simplify WriterPECOFF.

llvm-svn: 196762
This commit is contained in:
Rui Ueyama 2013-12-09 08:47:20 +00:00
parent 99b72425f0
commit d4339076c6
1 changed files with 1 additions and 5 deletions

View File

@ -987,11 +987,7 @@ void ExecutableWriter::build(const File &linkedFile) {
peHeader->setSizeOfUninitializedData(calcSizeOfUninitializedData());
peHeader->setNumberOfSections(_numSections);
peHeader->setSizeOfImage(_imageSizeInMemory);
// The combined size of the DOS, PE and section headers including garbage
// between the end of the header and the beginning of the first section.
peHeader->setSizeOfHeaders(dosStub->size() + peHeader->size() +
sectionTable->size() + dataDirectory->size());
peHeader->setSizeOfHeaders(sectionTable->fileOffset() + sectionTable->size());
setAddressOfEntryPoint(text, peHeader);
}