Browse Source

* force empty .idata section at end of each dll to be in executable with oso_keep option

git-svn-id: trunk@7126 -
pierre 18 years ago
parent
commit
a7f5951cb0
1 changed files with 3 additions and 0 deletions
  1. 3 0
      compiler/ogcoff.pas

+ 3 - 0
compiler/ogcoff.pas

@@ -2288,6 +2288,9 @@ const pemagic : array[0..3] of byte = (
           internalobjdata.writebytes(emptyint,sizeof(emptyint));
           if target_info.system=system_x86_64_win64 then
             internalobjdata.writebytes(emptyint,sizeof(emptyint));
+          { be sure that this will not be removed }
+          idata4objsection.SecOptions:=idata4objsection.SecOptions + [oso_keep];
+          idata5objsection.SecOptions:=idata5objsection.SecOptions + [oso_keep];
         end;
 
         function AddImport(const afuncname,amangledname:string; AOrdNr:longint;isvar:boolean):TObjSymbol;