syscall_32.c 896 B

123456789101112131415161718192021222324252627282930313233
  1. /* System call table for i386. */
  2. #include <linux/linkage.h>
  3. #include <linux/sys.h>
  4. #include <linux/cache.h>
  5. #include <asm/asm-offsets.h>
  6. #ifdef CONFIG_IA32_EMULATION
  7. #define SYM(sym, compat) compat
  8. #else
  9. #define SYM(sym, compat) sym
  10. #define ia32_sys_call_table sys_call_table
  11. #define __NR_syscall_compat_max __NR_syscall_max
  12. #endif
  13. #define __SYSCALL_I386(nr, sym, compat) extern asmlinkage void SYM(sym, compat)(void) ;
  14. #include <asm/syscalls_32.h>
  15. #undef __SYSCALL_I386
  16. #define __SYSCALL_I386(nr, sym, compat) [nr] = SYM(sym, compat),
  17. typedef asmlinkage void (*sys_call_ptr_t)(void);
  18. extern asmlinkage void sys_ni_syscall(void);
  19. __visible const sys_call_ptr_t ia32_sys_call_table[__NR_syscall_compat_max+1] = {
  20. /*
  21. * Smells like a compiler bug -- it doesn't work
  22. * when the & below is removed.
  23. */
  24. [0 ... __NR_syscall_compat_max] = &sys_ni_syscall,
  25. #include <asm/syscalls_32.h>
  26. };