Переглянути джерело

* 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. }