32 lines
931 B
Diff
32 lines
931 B
Diff
From b855ea26129711c87489ce185def60ea46a77698 Mon Sep 17 00:00:00 2001
|
|
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
|
|
Date: Sat, 19 Apr 2008 17:50:24 +0200
|
|
Subject: [PATCH 05/18] Sanity checks for syscall availability
|
|
|
|
Catch the case when syscall(2) is not implemented for the actual arch
|
|
instead of jumping to the next function and executing the wrong code
|
|
---
|
|
libcompat/syscall.S | 8 +++++++-
|
|
1 files changed, 7 insertions(+), 1 deletions(-)
|
|
|
|
diff --git a/libcompat/syscall.S b/libcompat/syscall.S
|
|
index c9f72bb..4188167 100644
|
|
--- a/libcompat/syscall.S
|
|
+++ b/libcompat/syscall.S
|
|
@@ -130,6 +130,12 @@ syscall:
|
|
b __unified_syscall
|
|
|
|
#else
|
|
- /* arch not implemented yet */
|
|
+#include <endian.h>
|
|
+ .section .comment
|
|
+#if (__WORDSIZE == 64)
|
|
+ .quad __syscall_2_not_implemented_for_this_arch
|
|
+#else
|
|
+ .long __syscall_2_not_implemented_for_this_arch
|
|
+#endif
|
|
#endif
|
|
.size syscall, . - syscall
|
|
--
|
|
1.6.2.5
|
|
|