Browse Source

amigaos4: fixed some alignment SNAFU in exec structures. this allows to fix the startup code properly

git-svn-id: trunk@35294 -
Károly Balogh 8 years ago
parent
commit
2591840264
2 changed files with 3 additions and 6 deletions
  1. 2 4
      rtl/amiga/powerpc/execd.inc
  2. 1 2
      rtl/amiga/powerpc/si_prc.pp

+ 2 - 4
rtl/amiga/powerpc/execd.inc

@@ -13,7 +13,6 @@
 
 
  **********************************************************************}
  **********************************************************************}
 
 
-{$PUSH}
 {$PACKRECORDS 2}
 {$PACKRECORDS 2}
 
 
 {$i utild1.inc}
 {$i utild1.inc}
@@ -1024,7 +1023,6 @@ const
 // function pointers similar to the old library jump table.
 // function pointers similar to the old library jump table.
 //
 //
 // FIXME: Add some more documentation
 // FIXME: Add some more documentation
-{$PUSH}
 {$PACKRECORDS C}
 {$PACKRECORDS C}
 
 
 type
 type
@@ -1050,7 +1048,7 @@ type
   end;
   end;
   POS4Interface = ^TOS4Interface;
   POS4Interface = ^TOS4Interface;
 
 
-{$POP}
+{$PACKRECORDS 2}
 
 
 const
 const
 // Flags for the Flags field in interfaces and as flags parameter for GetInterface
 // Flags for the Flags field in interfaces and as flags parameter for GetInterface
@@ -1738,4 +1736,4 @@ const
 
 
 //**********************************************************************
 //**********************************************************************
 
 
-{$POP}
+{$PACKRECORDS DEFAULT}

+ 1 - 2
rtl/amiga/powerpc/si_prc.pp

@@ -42,8 +42,7 @@ procedure PascalMain; external name 'PASCALMAIN';
 function _FPC_proc_start(arg0: pointer; arg1: pointer; argExecBase: Pointer): longint; cdecl; public name '_start';
 function _FPC_proc_start(arg0: pointer; arg1: pointer; argExecBase: Pointer): longint; cdecl; public name '_start';
 begin
 begin
   AOS_ExecBase:=argExecBase;
   AOS_ExecBase:=argExecBase;
-  { we should have a proper MainInterface structure instead of this hack... }
-  IExec:=PPointer(@PByte(AOS_ExecBase)[632])^;
+  IExec:=PExecBase(AOS_ExecBase)^.MainInterface;
 
 
   { 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 }