+ fill the segment table start offset in the NewExe header

git-svn-id: trunk@42584 -
This commit is contained in:
nickysn 2019-08-05 13:30:01 +00:00
parent 0167ddf44c
commit d7c24c05d0

View File

@ -324,6 +324,10 @@ interface
property MZFlatContentSection: TMZExeSection read GetMZFlatContentSection;
end;
const
NewExeHeaderSize = $40;
type
TNewExeHeaderFlag = (
nehfSingleData, { bit 0 }
nehfMultipleData, { bit 1 }
@ -3670,6 +3674,9 @@ cleanup:
Header.InitialCS:=TNewExeSection(EntrySym.objsection.ExeSection).MemBasePos;
Header.InitialSP:=0;
Header.InitialSS:=Header.AutoDataSegmentNumber;
Header.SegmentTableStart:=NewExeHeaderSize;
Header.WriteTo(FWriter);
{ todo: write the rest of the file as well }
Result:=True;