dietlibc/dietlibc-0.28-scall.patch
2005-05-01 11:06:12 +00:00

21 lines
597 B
Diff

2005-04-24 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
* libcompat/syscall.S: 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
--- dietlibc-0.28/libcompat/syscall.S.scall
+++ dietlibc-0.28/libcompat/syscall.S
@@ -137,5 +137,13 @@
mov -1, %o0
.Lret:
retl
+#else
+#include <endian.h>
+ .section .note
+#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