Browse Source

* stop linking if errors during symbol rsolving happen

git-svn-id: trunk@2906 -
peter 19 years ago
parent
commit
5a90c00aae
1 changed files with 4 additions and 2 deletions
  1. 4 2
      compiler/link.pas

+ 4 - 2
compiler/link.pas

@@ -882,8 +882,6 @@ end;
 
 
         { Load .o files and resolve symbols }
         { Load .o files and resolve symbols }
         ParseScript_Load;
         ParseScript_Load;
-        if ErrorCount>0 then
-          goto myexit;
         exeoutput.ResolveSymbols;
         exeoutput.ResolveSymbols;
         { DLL Linking }
         { DLL Linking }
         While not DLLFiles.Empty do
         While not DLLFiles.Empty do
@@ -894,6 +892,8 @@ end;
             else
             else
               Comment(V_Error,'DLL not found: '+s);
               Comment(V_Error,'DLL not found: '+s);
           end;
           end;
+        if ErrorCount>0 then
+          goto myexit;
 
 
         { Create .exe sections and add .o sections }
         { Create .exe sections and add .o sections }
         ParseScript_Order;
         ParseScript_Order;
@@ -907,6 +907,8 @@ end;
         exeoutput.FixupSymbols;
         exeoutput.FixupSymbols;
         exeoutput.FixupRelocations;
         exeoutput.FixupRelocations;
         exeoutput.PrintMemoryMap;
         exeoutput.PrintMemoryMap;
+        if ErrorCount>0 then
+          goto myexit;
 
 
         exeoutput.WriteExeFile(current_module.exefilename^);
         exeoutput.WriteExeFile(current_module.exefilename^);