Browse Source

+ prevent certain special omf sections from being smartlinked out

git-svn-id: trunk@31394 -
nickysn 10 years ago
parent
commit
18cdc08c26
1 changed files with 5 additions and 0 deletions
  1. 5 0
      compiler/ogomf.pas

+ 5 - 0
compiler/ogomf.pas

@@ -1189,6 +1189,11 @@ implementation
             exit;
           end;
         objsec.Size:=SegDefRec.SegmentLength;
+        if (SegClassName='HEAP') or
+           (SegClassName='STACK') or (SegDefRec.Combination=scStack) or
+           (SegClassName='BEGDATA') or
+           (SegmentName='FPC') then
+          objsec.SecOptions:=objsec.SecOptions+[oso_keep];
         SegDefRec.Free;
         Result:=True;
       end;