2016-05-05 11:49:05 +02:00
|
|
|
/*
|
2016-07-06 11:28:51 +02:00
|
|
|
gint core module: syscalls
|
|
|
|
|
2016-07-25 09:04:22 +02:00
|
|
|
All the system calls used by the library. Somehow "the less, the
|
|
|
|
better".
|
2016-05-05 11:49:05 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
.global ___GLibAddinAplExecutionCheck
|
2016-05-20 22:04:15 +02:00
|
|
|
.global _malloc
|
|
|
|
.global _calloc
|
|
|
|
.global _free
|
2016-05-05 11:49:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
___GLibAddinAplExecutionCheck:
|
|
|
|
mov.l syscall_table, r2
|
|
|
|
mov #0x13, r0
|
|
|
|
jmp @r2
|
|
|
|
nop
|
|
|
|
|
2016-05-20 22:04:15 +02:00
|
|
|
_malloc:
|
2016-05-05 11:49:05 +02:00
|
|
|
mov.l syscall_table, r2
|
|
|
|
mov.l 1f, r0
|
|
|
|
jmp @r2
|
|
|
|
nop
|
2016-05-20 22:04:15 +02:00
|
|
|
1: .long 0xacd
|
|
|
|
|
|
|
|
_calloc:
|
|
|
|
mov.l syscall_table, r2
|
|
|
|
mov.l 1f, r0
|
|
|
|
jmp @r2
|
|
|
|
nop
|
|
|
|
1: .long 0xe6b
|
|
|
|
|
|
|
|
_free:
|
|
|
|
mov.l syscall_table, r2
|
|
|
|
mov.l 1f, r0
|
|
|
|
jmp @r2
|
|
|
|
nop
|
|
|
|
1: .long 0xacc
|
2016-05-05 11:49:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.align 4
|
|
|
|
|
|
|
|
syscall_table:
|
|
|
|
.long 0x80010070
|