mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Ensure system call indices are valid expressions in libc syscall stubs.
This commit is contained in:
parent
01f6606b74
commit
234f186a7d
1 changed files with 5 additions and 0 deletions
|
@ -59,6 +59,11 @@
|
|||
/* Create a function that selects the right system call and jumps into the
|
||||
generic implementation of system calls. */
|
||||
#define SYSCALL_FUNCTION(syscall_name, syscall_index) \
|
||||
__attribute__((unused)) \
|
||||
static void __verify_index_expression_##syscall_name(void) \
|
||||
{ \
|
||||
(void) syscall_index; \
|
||||
} \
|
||||
__asm__("\n" \
|
||||
".pushsection .text\n" \
|
||||
".type " #syscall_name ", @function\n" \
|
||||
|
|
Loading…
Reference in a new issue