stub_segv.c 390 B

123456789101112131415161718
  1. /*
  2. * Copyright (C) 2004 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
  3. * Licensed under the GPL
  4. */
  5. #include "sysdep/stub.h"
  6. #include "sysdep/sigcontext.h"
  7. void __attribute__ ((__section__ (".__syscall_stub")))
  8. stub_segv_handler(int sig)
  9. {
  10. struct sigcontext *sc = (struct sigcontext *) (&sig + 1);
  11. GET_FAULTINFO_FROM_SC(*((struct faultinfo *) STUB_DATA), sc);
  12. trap_myself();
  13. }