Browse Source

* For wince external startup file is used and placed first, because ARM prolog structure must be located at the very beginning of code. Otherwise exceptions do not work properly.

git-svn-id: trunk@2786 -
yury 19 years ago
parent
commit
8a12d38862
2 changed files with 6 additions and 3 deletions
  1. 6 0
      compiler/systems/t_win.pas
  2. 0 3
      rtl/wince/system.pp

+ 6 - 0
compiler/systems/t_win.pas

@@ -953,6 +953,12 @@ begin
   if not ObjectFiles.Empty then
     begin
       LinkRes.Add('INPUT(');
+      { For wince external startup file is used and placed first,     }
+      { because ARM prolog structure must be located at the very      }
+      { beginning of code. Otherwise exceptions do not work properly. }
+      if target_info.system in [system_arm_wince,system_i386_wince] then
+        LinkRes.AddFileName(MaybeQuoted(FindObjectFile('wprt0','',false)));
+
       while not ObjectFiles.Empty do
         begin
           s:=ObjectFiles.GetFirst;

+ 0 - 3
rtl/wince/system.pp

@@ -23,9 +23,6 @@ interface
 
 {$define WINCE_EXCEPTION_HANDLING}
 
-{ Startup code }
-{$L wprt0.o}
-
 { include system-independent routine headers }
 {$I systemh.inc}