* combine the data, bss, stack and heap into the same NewExe segment

git-svn-id: trunk@42566 -
This commit is contained in:
nickysn 2019-08-02 16:53:16 +00:00
parent 1258439767
commit b739d79f9b
2 changed files with 5 additions and 21 deletions

View File

@ -476,19 +476,13 @@ interface
TNewExeMetaSection = ( TNewExeMetaSection = (
nemsNone, nemsNone,
nemsCode, nemsCode,
nemsData, nemsData);
nemsBss,
nemsStack,
nemsLocalHeap);
const const
NewExeMetaSection2String: array [TNewExeMetaSection] of string[9] = ( NewExeMetaSection2String: array [TNewExeMetaSection] of string[9] = (
'', '',
'Code', 'Code',
'Data', 'Data');
'Bss',
'Stack',
'LocalHeap');
type type
@ -3593,7 +3587,9 @@ cleanup:
procedure TNewExeSection.AddObjSection(objsec: TObjSection; ignoreprops: boolean); procedure TNewExeSection.AddObjSection(objsec: TObjSection; ignoreprops: boolean);
begin begin
inherited; { allow mixing initialized and uninitialized data in the same section
=> set ignoreprops=true }
inherited AddObjSection(objsec,true);
EarlySize:=align_qword(EarlySize,SecAlign)+objsec.Size; EarlySize:=align_qword(EarlySize,SecAlign)+objsec.Size;
end; end;
@ -3716,12 +3712,6 @@ cleanup:
CurrExeMetaSec:=nemsCode; CurrExeMetaSec:=nemsCode;
'.NE_data': '.NE_data':
CurrExeMetaSec:=nemsData; CurrExeMetaSec:=nemsData;
'.NE_bss':
CurrExeMetaSec:=nemsBss;
'.NE_stack':
CurrExeMetaSec:=nemsStack;
'.NE_localheap':
CurrExeMetaSec:=nemsLocalHeap;
else else
internalerror(2019080201); internalerror(2019080201);
end; end;

View File

@ -395,15 +395,9 @@ begin
LinkScript.Concat(' OBJSECTION *||BEGDATA'); LinkScript.Concat(' OBJSECTION *||BEGDATA');
LinkScript.Concat(' OBJSECTION *||DATA'); LinkScript.Concat(' OBJSECTION *||DATA');
LinkScript.Concat(' SYMBOL _edata'); LinkScript.Concat(' SYMBOL _edata');
LinkScript.Concat('ENDEXESECTION');
LinkScript.Concat('EXESECTION .NE_bss');
LinkScript.Concat(' OBJSECTION *||BSS'); LinkScript.Concat(' OBJSECTION *||BSS');
LinkScript.Concat(' SYMBOL _end'); LinkScript.Concat(' SYMBOL _end');
LinkScript.Concat('ENDEXESECTION');
LinkScript.Concat('EXESECTION .NE_stack');
LinkScript.Concat(' OBJSECTION *||STACK'); LinkScript.Concat(' OBJSECTION *||STACK');
LinkScript.Concat('ENDEXESECTION');
LinkScript.Concat('EXESECTION .NE_localheap');
LinkScript.Concat(' OBJSECTION *||HEAP'); LinkScript.Concat(' OBJSECTION *||HEAP');
LinkScript.Concat('ENDEXESECTION'); LinkScript.Concat('ENDEXESECTION');