arm: Don't override syscall implementation

This commit is contained in:
Jookia 2019-11-06 01:01:56 +11:00
parent 96f1fb1da0
commit f420259ee5

View File

@ -7,12 +7,12 @@
#ifdef __TINYC__
/* syscall wrapper */
unsigned syscall(unsigned syscall_nr, ...);
unsigned _tccsyscall(unsigned syscall_nr, ...);
/* arm-tcc supports only fake asm currently */
__asm__(
".global syscall\n"
"syscall:\n"
".global _tccsyscall\n"
"_tccsyscall:\n"
".int 0xe92d4080\n" // push {r7, lr}
".int 0xe1a07000\n" // mov r7, r0
".int 0xe1a00001\n" // mov r0, r1
@ -31,6 +31,8 @@ __asm__(
#define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000)
#define __ARM_NR_cacheflush (__ARM_NR_BASE+2)
#define syscall _tccsyscall
#else
#define _GNU_SOURCE