summaryrefslogtreecommitdiff
path: root/rtl/linux
diff options
context:
space:
mode:
authorpierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2>2021-01-19 22:30:59 +0000
committerpierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2>2021-01-19 22:30:59 +0000
commitcc549079c6c8b0065bb5682dd4f19e8b3dfcd22a (patch)
tree35b88d36c3bbf81589e07cdf58cc5e0977a2e08f /rtl/linux
parent1007816525453e91883ca423beae1da24f14d14b (diff)
downloadfpc-cc549079c6c8b0065bb5682dd4f19e8b3dfcd22a.tar.gz
Also set __stkptr inside cprt0.as and dllprt0.as startup assembly sources
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@48223 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl/linux')
-rw-r--r--rtl/linux/m68k/cprt0.as1
-rw-r--r--rtl/linux/m68k/dllprt0.as1
2 files changed, 2 insertions, 0 deletions
diff --git a/rtl/linux/m68k/cprt0.as b/rtl/linux/m68k/cprt0.as
index 46f8ddc403..0c47f6b308 100644
--- a/rtl/linux/m68k/cprt0.as
+++ b/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 */
diff --git a/rtl/linux/m68k/dllprt0.as b/rtl/linux/m68k/dllprt0.as
index c4f94ee050..e82b3b3f2b 100644
--- a/rtl/linux/m68k/dllprt0.as
+++ b/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