* 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 = (
nemsNone,
nemsCode,
nemsData,
nemsBss,
nemsStack,
nemsLocalHeap);
nemsData);
const
NewExeMetaSection2String: array [TNewExeMetaSection] of string[9] = (
'',
'Code',
'Data',
'Bss',
'Stack',
'LocalHeap');
'Data');
type
@ -3593,7 +3587,9 @@ cleanup:
procedure TNewExeSection.AddObjSection(objsec: TObjSection; ignoreprops: boolean);
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;
end;
@ -3716,12 +3712,6 @@ cleanup:
CurrExeMetaSec:=nemsCode;
'.NE_data':
CurrExeMetaSec:=nemsData;
'.NE_bss':
CurrExeMetaSec:=nemsBss;
'.NE_stack':
CurrExeMetaSec:=nemsStack;
'.NE_localheap':
CurrExeMetaSec:=nemsLocalHeap;
else
internalerror(2019080201);
end;

View File

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