From f420259ee5d3a2fe183e702d0bc8ed9ecd4f2ecc Mon Sep 17 00:00:00 2001 From: Jookia <166291@gmail.com> Date: Wed, 6 Nov 2019 01:01:56 +1100 Subject: [PATCH] arm: Don't override syscall implementation --- lib/armflush.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/armflush.c b/lib/armflush.c index eae3260..13955e1 100644 --- a/lib/armflush.c +++ b/lib/armflush.c @@ -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