diff options
author | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2012-10-19 14:43:00 +0000 |
---|---|---|
committer | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2012-10-19 14:43:00 +0000 |
commit | f36c5ca035772d0f1d46df9bba9cc8e606bbd2c1 (patch) | |
tree | a326ce442c9920b80c63dc55ee93f53f182eca76 /rtl | |
parent | 63683d417692e6141d359c1715588cec1d2e11c4 (diff) | |
download | fpc-f36c5ca035772d0f1d46df9bba9cc8e606bbd2c1.tar.gz |
* fixed compilation after introduction of nostackframe checks
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@22767 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl')
-rw-r--r-- | rtl/linux/i386/si_c.inc | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/rtl/linux/i386/si_c.inc b/rtl/linux/i386/si_c.inc index 6c264f5f2f..3ed00d3171 100644 --- a/rtl/linux/i386/si_c.inc +++ b/rtl/linux/i386/si_c.inc @@ -54,17 +54,13 @@ Procedure fpc_geteipasebx;[external name 'fpc_geteipasebx']; {$asmmode ATT} procedure _FPC_libc_start; assembler; nostackframe; public name '_start'; -var - _ebx: LongInt; - _ecx: LongInt; - _libc_init_proc: LongInt; asm { First locate the start of the environment variables } popl %ecx { Get argc in ecx } {$ifdef FPC_PIC} - movl %esp,_ebx { Points to the arguments } - movl %ecx,_ecx + movl %esp,%ebp { Points to the arguments } + movl %ecx,%esi {$else FPC_PIC} movl %esp,%ebx { Points to the arguments } {$endif FPC_PIC} @@ -83,15 +79,15 @@ asm pushl %eax movl operatingsystem_parameter_argc@GOT(%ebx),%ecx - movl _ecx,%eax + movl %esi,%eax movl %eax,(%ecx) movl operatingsystem_parameter_argv@GOT(%ebx),%ecx - movl _ebx,%eax + movl %ebp,%eax movl %eax,(%ecx) popl %eax popl %ecx - movl _ebx,%ebx + movl %ebp,%ebx {$else FPC_PIC} movl %eax,operatingsystem_parameter_envp { Move the environment pointer } movl %ecx,operatingsystem_parameter_argc { Move the argument counter } @@ -112,8 +108,7 @@ asm call fpc_geteipasebx addl $_GLOBAL_OFFSET_TABLE_,%ebx movl libc_init_proc@GOT(%ebx),%ecx - movl (%ecx),%ecx - movl %ecx,_libc_init_proc + movl (%ecx),%edi popl %ebx popl %ecx {$else FPC_PIC} @@ -129,7 +124,7 @@ asm popl %eax {$ifdef FPC_PIC} - call _libc_init_proc + call *%edi {$else FPC_PIC} call libc_init_proc {$endif FPC_PIC} |