diff options
Diffstat (limited to 'compel/arch/aarch64')
7 files changed, 63 insertions, 0 deletions
diff --git a/compel/arch/aarch64/plugins/std/syscalls/Makefile.syscalls b/compel/arch/aarch64/plugins/std/syscalls/Makefile.syscalls new file mode 120000 index 000000000..eba4d986c --- /dev/null +++ b/compel/arch/aarch64/plugins/std/syscalls/Makefile.syscalls @@ -0,0 +1 @@ +../../../../arm/plugins/std/syscalls/Makefile.syscalls
\ No newline at end of file diff --git a/compel/arch/aarch64/plugins/std/syscalls/gen-sys-exec-tbl.pl b/compel/arch/aarch64/plugins/std/syscalls/gen-sys-exec-tbl.pl new file mode 120000 index 000000000..8d7e897ae --- /dev/null +++ b/compel/arch/aarch64/plugins/std/syscalls/gen-sys-exec-tbl.pl @@ -0,0 +1 @@ +../../../../arm/plugins/std/syscalls/gen-sys-exec-tbl.pl
\ No newline at end of file diff --git a/compel/arch/aarch64/plugins/std/syscalls/gen-syscalls.pl b/compel/arch/aarch64/plugins/std/syscalls/gen-syscalls.pl new file mode 120000 index 000000000..5c9563611 --- /dev/null +++ b/compel/arch/aarch64/plugins/std/syscalls/gen-syscalls.pl @@ -0,0 +1 @@ +../../../../arm/plugins/std/syscalls/gen-syscalls.pl
\ No newline at end of file diff --git a/compel/arch/aarch64/plugins/std/syscalls/syscall-aux.S b/compel/arch/aarch64/plugins/std/syscalls/syscall-aux.S new file mode 100644 index 000000000..00ccf79c3 --- /dev/null +++ b/compel/arch/aarch64/plugins/std/syscalls/syscall-aux.S @@ -0,0 +1,37 @@ +/** + * This source contains emulation of syscalls + * that are not implemented in the AArch64 Linux kernel + */ + +ENTRY(sys_open) + mov x3, x2 + mov x2, x1 + mov x1, x0 + mov x0, #-100 + b sys_openat +END(sys_open) + + +ENTRY(sys_mkdir) + mov x3, x2 + mov x2, x1 + mov x1, x0 + mov x0, #-100 + b sys_mkdirat +END(sys_mkdir) + + +ENTRY(sys_rmdir) + mov x2, #0x200 // flags = AT_REMOVEDIR + mov x1, x0 + mov x0, #-100 + b sys_unlinkat +END(sys_rmdir) + + +ENTRY(sys_unlink) + mov x2, #0 // flags = 0 + mov x1, x0 + mov x0, #-100 + b sys_unlinkat +END(sys_unlink) diff --git a/compel/arch/aarch64/plugins/std/syscalls/syscall-aux.h b/compel/arch/aarch64/plugins/std/syscalls/syscall-aux.h new file mode 100644 index 000000000..6272bf3a8 --- /dev/null +++ b/compel/arch/aarch64/plugins/std/syscalls/syscall-aux.h @@ -0,0 +1,3 @@ +#ifndef __NR_openat +# define __NR_openat 56 +#endif diff --git a/compel/arch/aarch64/plugins/std/syscalls/syscall-common.S b/compel/arch/aarch64/plugins/std/syscalls/syscall-common.S new file mode 100644 index 000000000..aeb89ea88 --- /dev/null +++ b/compel/arch/aarch64/plugins/std/syscalls/syscall-common.S @@ -0,0 +1,19 @@ +#include "common/asm/linkage.h" + +syscall_common: + svc #0 + ret + + +.macro syscall name, nr + ENTRY(\name) + mov x8, \nr + b syscall_common + END(\name) +.endm + + +ENTRY(__cr_restore_rt) + mov x8, __NR_rt_sigreturn + svc #0 +END(__cr_restore_rt) diff --git a/compel/arch/aarch64/plugins/std/syscalls/syscall.def b/compel/arch/aarch64/plugins/std/syscalls/syscall.def new file mode 120000 index 000000000..ebecde3cb --- /dev/null +++ b/compel/arch/aarch64/plugins/std/syscalls/syscall.def @@ -0,0 +1 @@ +../../../../arm/plugins/std/syscalls/syscall.def
\ No newline at end of file |