blob: 28ccf737a79fa9c7364e89fb6c36d3d0608a2f62 [file] [log] [blame]
Jeff Diked67b5692005-07-07 17:56:49 -07001/*
Jeff Dikeee3d9bd2008-02-04 22:30:56 -08002 * Copyright (C) 2004 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
Jeff Diked67b5692005-07-07 17:56:49 -07003 * Licensed under the GPL
4 */
5
Jeff Dike17d46972005-11-21 21:32:09 -08006#include "sysdep/stub.h"
Jeff Diked67b5692005-07-07 17:56:49 -07007#include "sysdep/sigcontext.h"
Jeff Diked67b5692005-07-07 17:56:49 -07008
9void __attribute__ ((__section__ (".__syscall_stub")))
10stub_segv_handler(int sig)
11{
12 struct sigcontext *sc = (struct sigcontext *) (&sig + 1);
13
Jeff Dike54ae36f2007-10-16 01:27:33 -070014 GET_FAULTINFO_FROM_SC(*((struct faultinfo *) STUB_DATA), sc);
Jeff Diked67b5692005-07-07 17:56:49 -070015
Jeff Dikeee3d9bd2008-02-04 22:30:56 -080016 trap_myself();
Jeff Diked67b5692005-07-07 17:56:49 -070017}