Ver Fonte

* win32 dll smartlink patch from Pavel V. Ozerski

git-svn-id: trunk@182 -
peter há 20 anos atrás
pai
commit
2720cbd25b
2 ficheiros alterados com 6 adições e 3 exclusões
  1. 3 1
      compiler/pexports.pas
  2. 3 2
      compiler/pmodules.pas

+ 3 - 1
compiler/pexports.pas

@@ -28,7 +28,8 @@ interface
     { reads an exports statement in a library }
     procedure read_exports;
 
-
+    var
+      BinaryContainsExports: boolean = false;
 implementation
 
     uses
@@ -77,6 +78,7 @@ implementation
         end;
 
       begin
+         BinaryContainsExports:=true;
          DefString:='';
          InternalProcName:='';
          consume(_EXPORTS);

+ 3 - 2
compiler/pmodules.pas

@@ -41,7 +41,7 @@ implementation
        nbas,ncgutil,
        link,assemble,import,export,gendef,ppu,comprsrc,
        cresstr,procinfo,
-       dwarf,
+       dwarf,pexports,
 {$ifdef GDB}
        gdb,
 {$endif GDB}
@@ -1487,7 +1487,7 @@ implementation
            DLL will include the edata section }
          if assigned(exportlib) and
             (target_info.system in [system_i386_win32,system_i386_wdosx]) and
-            assigned(current_module._exports.first) then
+            BinaryContainsExports then
            codesegment.concat(tai_const.create_sym(exportlib.edatalabel));
 
          If ResourceStrings.ResStrCount>0 then
@@ -1619,6 +1619,7 @@ implementation
                 linker.MakeSharedLibrary
                else
                 linker.MakeExecutable;
+               BinaryContainsExports:=false;
              end;
           end;
       end;