syscall.c 651 B

12345678910111213141516171819202122232425
  1. /* System call table for x86-64. */
  2. #include <linux/linkage.h>
  3. #include <linux/sys.h>
  4. #include <linux/cache.h>
  5. #define __NO_STUBS
  6. #define __SYSCALL(nr, sym) extern asmlinkage void sym(void) ;
  7. #undef _ASM_X86_64_UNISTD_H_
  8. #include <asm-x86_64/unistd.h>
  9. #undef __SYSCALL
  10. #define __SYSCALL(nr, sym) [ nr ] = sym,
  11. #undef _ASM_X86_64_UNISTD_H_
  12. typedef void (*sys_call_ptr_t)(void);
  13. extern void sys_ni_syscall(void);
  14. const sys_call_ptr_t sys_call_table[__NR_syscall_max+1] = {
  15. /* Smells like a like a compiler bug -- it doesn't work when the & below is removed. */
  16. [0 ... __NR_syscall_max] = &sys_ni_syscall,
  17. #include <asm-x86_64/unistd.h>
  18. };