mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 04:26:13 +02:00
+ fill the segment table start offset in the NewExe header
git-svn-id: trunk@42584 -
This commit is contained in:
parent
0167ddf44c
commit
d7c24c05d0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user