소스 검색

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