From 25918402647526aabebfe1a3c95c98da6727a4ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1roly=20Balogh?= Date: Sat, 14 Jan 2017 01:57:46 +0000 Subject: [PATCH] amigaos4: fixed some alignment SNAFU in exec structures. this allows to fix the startup code properly git-svn-id: trunk@35294 - --- rtl/amiga/powerpc/execd.inc | 6 ++---- rtl/amiga/powerpc/si_prc.pp | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/rtl/amiga/powerpc/execd.inc b/rtl/amiga/powerpc/execd.inc index 62c66f3491..5911973050 100644 --- a/rtl/amiga/powerpc/execd.inc +++ b/rtl/amiga/powerpc/execd.inc @@ -13,7 +13,6 @@ **********************************************************************} -{$PUSH} {$PACKRECORDS 2} {$i utild1.inc} @@ -1024,7 +1023,6 @@ const // function pointers similar to the old library jump table. // // FIXME: Add some more documentation -{$PUSH} {$PACKRECORDS C} type @@ -1050,7 +1048,7 @@ type end; POS4Interface = ^TOS4Interface; -{$POP} +{$PACKRECORDS 2} const // Flags for the Flags field in interfaces and as flags parameter for GetInterface @@ -1738,4 +1736,4 @@ const //********************************************************************** -{$POP} +{$PACKRECORDS DEFAULT} diff --git a/rtl/amiga/powerpc/si_prc.pp b/rtl/amiga/powerpc/si_prc.pp index 3a898aa78b..77e39cb3f4 100644 --- a/rtl/amiga/powerpc/si_prc.pp +++ b/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'; begin 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 doesn't get striped out }