Browse Source

amigaos4: hopefully fixed the new pascal sysinit

git-svn-id: trunk@35293 -
Károly Balogh 8 years ago
parent
commit
4d22233827
1 changed files with 5 additions and 5 deletions
  1. 5 5
      rtl/amiga/powerpc/si_prc.pp

+ 5 - 5
rtl/amiga/powerpc/si_prc.pp

@@ -38,12 +38,12 @@ procedure PascalMain; external name 'PASCALMAIN';
 
 
 
 
 { this function must be the first in this unit which contains code }
 { this function must be the first in this unit which contains code }
-{ apparently, the third argument contains the IExec on entry (KB) }
-function _FPC_proc_start(arg0: pointer; arg1: pointer; argIExec: POS4Interface): longint; cdecl; public name '_start';
+{ apparently, the third argument contains the ExecBase on entry (KB) }
+function _FPC_proc_start(arg0: pointer; arg1: pointer; argExecBase: Pointer): longint; cdecl; public name '_start';
 begin
 begin
-  IExec:=argIExec;
-  AOS_ExecBase:=argIExec^.Data.LibBase;
-  amigaos4_signature:=1;   { Hack: prevent section gc to remove this, until VLink has a fix (KB) }
+  AOS_ExecBase:=argExecBase;
+  { we should have a proper MainInterface structure instead of this hack... }
+  IExec:=PPointer(@PByte(AOS_ExecBase)[632])^;
 
 
   { The StackCookie check is only here so the symbol is referenced and
   { The StackCookie check is only here so the symbol is referenced and
     doesn't get striped out }
     doesn't get striped out }