From d69cf3a440201fe5ff83b55f8c3332236319d0e1 Mon Sep 17 00:00:00 2001 From: nickysn Date: Sat, 10 Aug 2019 12:42:28 +0000 Subject: [PATCH] + pass the ParmCount parameter from the ExpDef OMF record to the NewExe entry point git-svn-id: trunk@42641 - --- compiler/ogomf.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/ogomf.pas b/compiler/ogomf.pas index 922e89b522..1d95ff1de8 100644 --- a/compiler/ogomf.pas +++ b/compiler/ogomf.pas @@ -584,11 +584,13 @@ interface FFlags: TNewExeEntryPointFlags; FSegment: Byte; FOffset: Word; + FParmCount: Integer; function GetFlagsByte: Byte; public property Flags: TNewExeEntryPointFlags read FFlags write FFlags; property Segment: Byte read FSegment write FSegment; property Offset: Word read FOffset write FOffset; + property ParmCount: Integer read FParmCount write FParmCount; property FlagsByte: Byte read GetFlagsByte; end; @@ -3996,7 +3998,7 @@ cleanup: function TNewExeEntryPoint.GetFlagsByte: Byte; begin - Result:=0; + Result:=Byte(ParmCount shl 3); if neepfExported in Flags then Result:=Result or 1; if neepfSingleData in Flags then @@ -4469,6 +4471,7 @@ cleanup: ent.Segment:=sec.MemBasePos; if nesfMovable in sec.NewExeSegmentFlags then ent.Flags:=ent.Flags+[neepfMovableSegment]; + ent.ParmCount:=sym.ParmCount; end; end; end;