1
0
Fork 0
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:
Jonas 'Sortie' Termansen 2014-02-23 14:09:22 +01:00
parent 01f6606b74
commit 234f186a7d

View file

@ -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" \