diff options
author | Andy Lutomirski <luto@amacapital.net> | 2014-12-04 12:28:57 -0800 |
---|---|---|
committer | Andy Lutomirski <luto@amacapital.net> | 2014-12-04 12:28:57 -0800 |
commit | 0b0e0cbec6cdc353fb538580db8ef4ac2bf40467 (patch) | |
tree | 91b31eed6b960006fa52e13cc2580be69b1f04c0 | |
parent | 74d1ad147f3079da3916c4ce8664b0055aa83cb8 (diff) | |
download | misc-tests-0b0e0cbec6cdc353fb538580db8ef4ac2bf40467.tar.gz |
sigreturn: Warn if running the 64-bit version
-rw-r--r-- | sigreturn.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sigreturn.c b/sigreturn.c index 8c26c5d..510d193 100644 --- a/sigreturn.c +++ b/sigreturn.c @@ -436,6 +436,12 @@ int main() int total_nerrs = 0; unsigned short my_cs, my_ss; +#ifdef __x86_64__ + printf("[WARN]\t***** The 64-bit version requires a special kernel. *****\n"); + printf("[WARN]\t***** Build with -m32. *****\n"); + usleep(1000000); +#endif + asm volatile ("mov %%cs,%0" : "=r" (my_cs)); asm volatile ("mov %%ss,%0" : "=r" (my_ss)); setup_ldt(); |