dietlibc/dietlibc-0.29-scall.patch
2005-05-24 11:20:05 +00:00

21 lines
608 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.29/libcompat/syscall.S.scall
+++ dietlibc-0.29/libcompat/syscall.S
@@ -120,6 +120,12 @@
nop
#else
- /* arch not implemented yet */
+#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