Browse Source

Also set __stkptr inside cprt0.as and dllprt0.as startup assembly sources

git-svn-id: trunk@48223 -
pierre 4 years ago
parent
commit
0055023394
2 changed files with 2 additions and 0 deletions
  1. 1 0
      rtl/linux/m68k/cprt0.as
  2. 1 0
      rtl/linux/m68k/dllprt0.as

+ 1 - 0
rtl/linux/m68k/cprt0.as

@@ -38,6 +38,7 @@ __entry:
         lea.l    8(%sp,%d0.l*4),%a0
         move.l   %a0,operatingsystem_parameter_envp
         move.l   %sp,%a0       /* argv */
+        move.l   %sp,__stkptr
 
         pea      (%sp)         /* highest available stack address */
         pea      (%a1)         /* termination function provided by kernel */

+ 1 - 0
rtl/linux/m68k/dllprt0.as

@@ -24,6 +24,7 @@ _startlib:
 # This is a normal C function with args (argc,argv,envp)
 FPC_SHARED_LIB_START:
         link.w   %a6,#0
+        move.l   %sp,__stkptr
         move.l   8(%fp),%d0
         move.l   %d0,operatingsystem_parameter_argc
         move.l   12(%fp),%d0