|
@@ -642,7 +642,6 @@ interface
|
|
private
|
|
private
|
|
FEarlySize: QWord;
|
|
FEarlySize: QWord;
|
|
FStackSize: QWord;
|
|
FStackSize: QWord;
|
|
- FLocalHeapSize: QWord;
|
|
|
|
FExeMetaSec: TNewExeMetaSection;
|
|
FExeMetaSec: TNewExeMetaSection;
|
|
FMemBasePos: Word;
|
|
FMemBasePos: Word;
|
|
FDataPosSectors: Word;
|
|
FDataPosSectors: Word;
|
|
@@ -655,7 +654,6 @@ interface
|
|
function CanAddObjSection(objsec:TObjSection;ExeSectionLimit:QWord):boolean;
|
|
function CanAddObjSection(objsec:TObjSection;ExeSectionLimit:QWord):boolean;
|
|
property EarlySize: QWord read FEarlySize write FEarlySize;
|
|
property EarlySize: QWord read FEarlySize write FEarlySize;
|
|
property StackSize: QWord read FStackSize write FStackSize;
|
|
property StackSize: QWord read FStackSize write FStackSize;
|
|
- property LocalHeapSize: QWord read FLocalHeapSize write FLocalHeapSize;
|
|
|
|
property ExeMetaSec: TNewExeMetaSection read FExeMetaSec write FExeMetaSec;
|
|
property ExeMetaSec: TNewExeMetaSection read FExeMetaSec write FExeMetaSec;
|
|
property MemBasePos: Word read FMemBasePos write FMemBasePos;
|
|
property MemBasePos: Word read FMemBasePos write FMemBasePos;
|
|
property DataPosSectors: Word read FDataPosSectors write FDataPosSectors;
|
|
property DataPosSectors: Word read FDataPosSectors write FDataPosSectors;
|
|
@@ -4184,7 +4182,7 @@ cleanup:
|
|
s: TSymStr;
|
|
s: TSymStr;
|
|
Separator: SizeInt;
|
|
Separator: SizeInt;
|
|
SegName, SegClass: string;
|
|
SegName, SegClass: string;
|
|
- IsStack, IsHeap: Boolean;
|
|
|
|
|
|
+ IsStack: Boolean;
|
|
begin
|
|
begin
|
|
{ allow mixing initialized and uninitialized data in the same section
|
|
{ allow mixing initialized and uninitialized data in the same section
|
|
=> set ignoreprops=true }
|
|
=> set ignoreprops=true }
|
|
@@ -4212,9 +4210,6 @@ cleanup:
|
|
IsStack:=True;
|
|
IsStack:=True;
|
|
if IsStack then
|
|
if IsStack then
|
|
StackSize:=StackSize+objsec.Size;
|
|
StackSize:=StackSize+objsec.Size;
|
|
- IsHeap:=SegClass='HEAP';
|
|
|
|
- if IsHeap then
|
|
|
|
- LocalHeapSize:=LocalHeapSize+objsec.Size;
|
|
|
|
EarlySize:=align_qword(EarlySize,SecAlign)+objsec.Size;
|
|
EarlySize:=align_qword(EarlySize,SecAlign)+objsec.Size;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -4323,8 +4318,8 @@ cleanup:
|
|
Header.InitialSP:=0;
|
|
Header.InitialSP:=0;
|
|
Header.InitialSS:=Header.AutoDataSegmentNumber;
|
|
Header.InitialSS:=Header.AutoDataSegmentNumber;
|
|
Header.InitialStackSize:=TNewExeSection(ExeSectionList[Header.AutoDataSegmentNumber-1]).StackSize;
|
|
Header.InitialStackSize:=TNewExeSection(ExeSectionList[Header.AutoDataSegmentNumber-1]).StackSize;
|
|
- Header.InitialLocalHeapSize:=TNewExeSection(ExeSectionList[Header.AutoDataSegmentNumber-1]).LocalHeapSize;
|
|
|
|
- {todo: subtract the stack size and the local heap size from the size of the auto data segment }
|
|
|
|
|
|
+ Header.InitialLocalHeapSize:=heapsize;
|
|
|
|
+ {todo: subtract the stack size from the size of the auto data segment }
|
|
|
|
|
|
Header.SegmentTableStart:=NewExeHeaderSize;
|
|
Header.SegmentTableStart:=NewExeHeaderSize;
|
|
Header.SegmentTableEntriesCount:=ExeSectionList.Count;
|
|
Header.SegmentTableEntriesCount:=ExeSectionList.Count;
|