mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 20:58:22 +00:00
hook new syscalls to mlibc
This commit is contained in:
@@ -50,6 +50,8 @@ extern syscall_connect
|
||||
extern syscall_accept
|
||||
extern syscall_newthread
|
||||
extern syscall_threadexit
|
||||
extern syscall_futex
|
||||
extern syscall_gettid
|
||||
syscalltab:
|
||||
dq syscall_print
|
||||
dq syscall_mmap
|
||||
@@ -102,7 +104,9 @@ dq syscall_connect
|
||||
dq syscall_accept
|
||||
dq syscall_newthread
|
||||
dq syscall_threadexit
|
||||
syscallcount equ 51
|
||||
dq syscall_futex
|
||||
dq syscall_gettid
|
||||
syscallcount equ 53
|
||||
section .text
|
||||
global arch_syscall_entry
|
||||
; on entry:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#ifdef SYSCALL_LOGGING
|
||||
|
||||
#define SYSCALL_COUNT 48
|
||||
#define SYSCALL_COUNT 53
|
||||
#define LOGSTR(x) arch_e9_puts(x)
|
||||
|
||||
static char *name[] = {
|
||||
@@ -56,7 +56,11 @@ static char *name[] = {
|
||||
"recvmsg",
|
||||
"listen",
|
||||
"connect",
|
||||
"accept"
|
||||
"accept",
|
||||
"newthread",
|
||||
"threadexit",
|
||||
"futex",
|
||||
"gettid"
|
||||
};
|
||||
|
||||
static char *args[] = {
|
||||
@@ -108,7 +112,11 @@ static char *args[] = {
|
||||
"fd %d msghdr %p flags %d", // recvmsg
|
||||
"fd %d backlog %d", // listen
|
||||
"fd %d addr %p addrlen %lu", // connect
|
||||
"fd %d addr %p addrlen %p" // accept
|
||||
"fd %d addr %p addrlen %p", // accept
|
||||
"entry %p stack %p", // newthread
|
||||
"N/A", // threadexit
|
||||
"futex %p op %d value %d timespec %p", // futex
|
||||
"N/A" // gettid
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user