浏览代码

* internal coff linker takes care of min./max. stack size as well as pe flags

git-svn-id: trunk@12648 -
florian 16 年之前
父节点
当前提交
a3d784b8e5
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      compiler/ogcoff.pas

+ 7 - 1
compiler/ogcoff.pas

@@ -2244,6 +2244,12 @@ const pemagic : array[0..3] of byte = (
             peoptheader.DllCharacteristics:=0;
             peoptheader.SizeOfStackReserve:=stacksize;
             peoptheader.SizeOfStackCommit:=$1000;
+            if MinStackSizeSetExplicity then
+              peoptheader.SizeOfStackCommit:=minstacksize;
+            if MaxStackSizeSetExplicity then
+              peoptheader.SizeOfStackReserve:=maxstacksize;
+            if SetPEFlagsSetExplicity then
+              peoptheader.LoaderFlags:=peflags;
             peoptheader.SizeOfHeapReserve:=$100000;
             peoptheader.SizeOfHeapCommit:=$1000;
             peoptheader.NumberOfRvaAndSizes:=PE_DATADIR_ENTRIES;
@@ -2267,7 +2273,7 @@ const pemagic : array[0..3] of byte = (
             djoptheader.entry:=EntrySym.offset;
             FWriter.write(djoptheader,sizeof(djoptheader));
           end;
-          
+
         { For some unknown reason WM 6.1 requires .idata section to be read only.
           Otherwise it refuses to load DLLs greater than 64KB.
           Earlier versions of WinCE load DLLs regardless of .idata flags. }