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
1 changed files with 5 additions and 0 deletions

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