summaryrefslogtreecommitdiff
path: root/syscall.awk
diff options
context:
space:
mode:
Diffstat (limited to 'syscall.awk')
-rw-r--r--syscall.awk12
1 files changed, 12 insertions, 0 deletions
diff --git a/syscall.awk b/syscall.awk
new file mode 100644
index 0000000..521fee8
--- /dev/null
+++ b/syscall.awk
@@ -0,0 +1,12 @@
+BEGIN {
+ print ".ifndef __SYSCALL__"
+ print ".set __SYSCALL__, 1"
+ print ""
+}
+
+/#define __NR_/ { printf ".equ %s, %s\n", $2, $3 }
+
+END {
+ print ""
+ print ".endif"
+}