Parcourir la source

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

git-svn-id: trunk@12648 -
florian il y a 16 ans
Parent
commit
a3d784b8e5
1 fichiers modifiés avec 7 ajouts et 1 suppressions
  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. }