31 |
} while(0) |
} while(0) |
32 |
|
|
33 |
|
|
34 |
#ifdef IN_GBC |
#define GET_FAULT_ADDR(sig,code,sv,a) ((siginfo_t *)code)->si_addr |
35 |
/* Based upon sun4.h */ |
#define MPROTECT_ACTION_FLAGS SA_RESTART | SA_ONSTACK | SA_SIGINFO |
|
#define MPROTECT_ACTION_FLAGS SA_RESTART |
|
36 |
#define INSTALL_MPROTECT_HANDLER \ |
#define INSTALL_MPROTECT_HANDLER \ |
37 |
do {static struct sigaction action; \ |
do {static struct sigaction action; \ |
38 |
action.sa_handler = (void *)memprotect_handler; \ |
action.sa_handler = (void *)memprotect_handler; \ |
44 |
sigaction(SIGSEGV,&action,0); \ |
sigaction(SIGSEGV,&action,0); \ |
45 |
sigaction(SIGBUS,&action,0);} while (0) |
sigaction(SIGBUS,&action,0);} while (0) |
46 |
|
|
|
#endif |
|
|
|
|
47 |
#undef SETUP_SIG_STACK |
#undef SETUP_SIG_STACK |
48 |
|
|
49 |
#define ELF_TEXT_BASE DBEGIN |
#define ELF_TEXT_BASE DBEGIN |