mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-31 17:10:14 +02:00
* fixed the haltproc for shared libs
git-svn-id: trunk@41763 -
This commit is contained in:
parent
01669ebf70
commit
b4baba3454
@ -34,21 +34,12 @@ procedure _FPC_shared_lib_start; cdecl; public name 'FPC_LIB_START';
|
||||
PascalMain;
|
||||
end;
|
||||
|
||||
procedure _FPC_proc_haltproc; assembler; nostackframe; public name '_haltproc';
|
||||
{ this routine is only called when the halt() routine of the RTL embedded in
|
||||
the shared library is called }
|
||||
procedure _FPC_shared_lib_haltproc; cdecl; assembler; nostackframe; public name '_haltproc';
|
||||
asm
|
||||
movq $1,%rax
|
||||
movl operatingsystem_result(%rip),%ebx
|
||||
pushq %rbx
|
||||
call .Lactualsyscall
|
||||
addq $8,%rsp
|
||||
jmp _FPC_proc_haltproc
|
||||
|
||||
.Lactualsyscall:
|
||||
int $0x80
|
||||
jb .LErrorcode
|
||||
xor %rbx,%rbx
|
||||
ret
|
||||
.LErrorcode:
|
||||
movq %rax,%rbx
|
||||
movq $-1,%rax
|
||||
movl operatingsystem_result(%rip),%edi
|
||||
syscall
|
||||
jmp _FPC_shared_lib_haltproc
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user