diff options
author | Stafford Horne <shorne@gmail.com> | 2017-12-14 15:29:08 +0900 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2018-01-15 20:01:22 +0000 |
commit | f76de0893c0b9dff39ded38023cb6957cb09fb9f (patch) | |
tree | c8478c340b1d1eaa452dac36e8ce5d81046aa3d8 | |
parent | 6237a836c8c9df96a185dd59522c05c33ea2b622 (diff) |
nds32: Use new common syscall() implementation
Traditionally nds32 has had a generic syscall implementation supporting
varargs.
During an audit it was found that this implementation seems to duplicate
the new common implementation and is no longer needed.
Signed-off-by: Stafford Horne <shorne@gmail.com>
-rw-r--r-- | libc/sysdeps/linux/nds32/Makefile.arch | 4 | ||||
-rw-r--r-- | libc/sysdeps/linux/nds32/syscall.c | 28 |
2 files changed, 2 insertions, 30 deletions
diff --git a/libc/sysdeps/linux/nds32/Makefile.arch b/libc/sysdeps/linux/nds32/Makefile.arch index d5cdddbfa..caf163844 100644 --- a/libc/sysdeps/linux/nds32/Makefile.arch +++ b/libc/sysdeps/linux/nds32/Makefile.arch @@ -1,7 +1,7 @@ # Copyright (C) 2016 Andes Technology, Inc. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -CSRC-y := brk.c prctl.c mremap.c syscall.c -SSRC-y := setjmp.S __longjmp.S bsd-setjmp.S bsd-_setjmp.S clone.S vfork.S sysdep.S syscall.S +CSRC-y := brk.c prctl.c mremap.c +SSRC-y := setjmp.S __longjmp.S bsd-setjmp.S bsd-_setjmp.S clone.S vfork.S sysdep.S CSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += makecontext.c swapcontext.c SSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += getcontext.S setcontext.S diff --git a/libc/sysdeps/linux/nds32/syscall.c b/libc/sysdeps/linux/nds32/syscall.c deleted file mode 100644 index 2c949ef3a..000000000 --- a/libc/sysdeps/linux/nds32/syscall.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 Andes Technology, Inc. - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. - */ - -#include <errno.h> -#include <stdarg.h> -#include <sys/syscall.h> -#include <sysdep.h> -#include <unistd.h> -long int syscall (long int __sysno, ...) -{ - - int result; - unsigned long arg1,arg2,arg3,arg4,arg5,arg6; - va_list arg; - va_start (arg, __sysno); - arg1 = va_arg (arg, unsigned long); - arg2 = va_arg (arg, unsigned long); - arg3 = va_arg (arg, unsigned long); - arg4 = va_arg (arg, unsigned long); - arg5 = va_arg (arg, unsigned long); - arg6 = va_arg (arg, unsigned long); - va_end (arg); - __asm__ volatile ( "" ::: "memory" ); - result = INLINE_SYSCALL(syscall,7,__sysno,arg1,arg2,arg3,arg4,arg5,arg6); - return result; -} |