We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e824672 + a45d5f0 commit 3667225Copy full SHA for 3667225
lld/COFF/Writer.cpp
@@ -1451,9 +1451,10 @@ template <typename PEHeaderTy> void Writer::writeHeader() {
1451
dos->Magic[0] = 'M';
1452
dos->Magic[1] = 'Z';
1453
dos->UsedBytesInTheLastPage = dosStubSize % 512;
1454
- dos->FileSizeInPages = divideCeil(dosStubSize, 512);
+ dos->FileSizeInPages = 3;
1455
dos->HeaderSizeInParagraphs = sizeof(dos_header) / 16;
1456
-
+ dos->MaximumExtraParagraphs = 0xFFFF;
1457
+ dos->InitialSP = 0xB8;
1458
dos->AddressOfRelocationTable = sizeof(dos_header);
1459
dos->AddressOfNewExeHeader = dosStubSize;
1460
0 commit comments