@@ -27,9 +27,28 @@
#include <dl-sysdep.h>
#ifdef __ASSEMBLER__
-# define SYSCALL_INST syscall
+.macro SYSCALL_INST
+ 551:
+ syscall
+ nop;nop;nop;nop;nop;nop;nop;nop;nop;nop
+ 552:
+ .pushsection .libos.instructions.syscall, "a"
+ .balign 8
+ .quad 551b
+ .byte 552b - 551b
+ .popsection
+.endm
#else
-# define SYSCALL_INST "syscall\n\t"
+#define SYSCALL_INST \
+ "551:\n\t" \
+ "syscall\n\t" \
+ "nop;nop;nop;nop;nop;nop;nop;nop;nop;nop\n\t" \
+ "552:\n\t" \
+ ".pushsection .libos.instructions.syscall, \"a\"\n\t" \
+ ".balign 8\n\t" \
+ ".quad 551b\n\t" \
+ ".byte 552b-551b\n\t" \
+ ".popsection\n\t"
#endif
/* For Linux we can use the system call table in the header file