summaryrefslogtreecommitdiff
path: root/riscv/riscv-probe/examples/argv0
diff options
context:
space:
mode:
Diffstat (limited to 'riscv/riscv-probe/examples/argv0')
-rw-r--r--riscv/riscv-probe/examples/argv0/main.c6
-rw-r--r--riscv/riscv-probe/examples/argv0/rules.mk1
2 files changed, 7 insertions, 0 deletions
diff --git a/riscv/riscv-probe/examples/argv0/main.c b/riscv/riscv-probe/examples/argv0/main.c
new file mode 100644
index 0000000..7699fe2
--- /dev/null
+++ b/riscv/riscv-probe/examples/argv0/main.c
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+int main(int argc, char **argv)
+{
+ printf("%s\n", argv[0]);
+}
diff --git a/riscv/riscv-probe/examples/argv0/rules.mk b/riscv/riscv-probe/examples/argv0/rules.mk
new file mode 100644
index 0000000..0ceeeaa
--- /dev/null
+++ b/riscv/riscv-probe/examples/argv0/rules.mk
@@ -0,0 +1 @@
+argv0_objs = main.o