|
@@ -65,14 +65,19 @@ _startlib:
|
|
popq %rbx
|
|
popq %rbx
|
|
ret
|
|
ret
|
|
|
|
|
|
|
|
+/* this routine is only called when the halt() routine of the RTL embedded in
|
|
|
|
+ the shared library is called */
|
|
.globl _haltproc
|
|
.globl _haltproc
|
|
.type _haltproc,@function
|
|
.type _haltproc,@function
|
|
_haltproc:
|
|
_haltproc:
|
|
.globl FPC_SHARED_LIB_EXIT
|
|
.globl FPC_SHARED_LIB_EXIT
|
|
.type FPC_SHARED_LIB_EXIT,@function
|
|
.type FPC_SHARED_LIB_EXIT,@function
|
|
FPC_SHARED_LIB_EXIT:
|
|
FPC_SHARED_LIB_EXIT:
|
|
- call FPC_LIB_EXIT@PLT
|
|
|
|
- ret
|
|
|
|
|
|
+ movl $231,%eax /* exit_group call */
|
|
|
|
+ movq operatingsystem_result@GOTPCREL(%rip),%rbx
|
|
|
|
+ movzwl (%rbx),%edi
|
|
|
|
+ syscall
|
|
|
|
+ jmp _haltproc@PLT
|
|
|
|
|
|
/* Define a symbol for the first piece of initialized data. */
|
|
/* Define a symbol for the first piece of initialized data. */
|
|
.data
|
|
.data
|