aboutsummaryrefslogtreecommitdiff
path: root/03_hello_dynld/main.c
diff options
context:
space:
mode:
authorjohannst <johannes.stoelp@gmail.com>2021-03-20 03:16:23 +0100
committerjohannst <johannes.stoelp@gmail.com>2021-03-20 03:16:23 +0100
commit4e871c9dd0418c4f6d33c83fd3338ad261f7dd3f (patch)
treeb86c40b4dc1ad05b92eee8ad76615cf572bbf5b0 /03_hello_dynld/main.c
parentef6a411ce8ff615d65e2be105834c2fdbe557de1 (diff)
downloaddynld-4e871c9dd0418c4f6d33c83fd3338ad261f7dd3f.tar.gz
dynld-4e871c9dd0418c4f6d33c83fd3338ad261f7dd3f.zip
added chapter 03 hello dynld
Diffstat (limited to '03_hello_dynld/main.c')
-rw-r--r--03_hello_dynld/main.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/03_hello_dynld/main.c b/03_hello_dynld/main.c
new file mode 100644
index 0000000..acf1ff7
--- /dev/null
+++ b/03_hello_dynld/main.c
@@ -0,0 +1,11 @@
+// Copyright (c) 2021 Johannes Stoelp
+
+#include <syscall.h>
+#include <io.h>
+
+#include <asm/unistd.h>
+
+void _start() {
+ pfmt("Running %s @ %s\n", __FUNCTION__, __FILE__);
+ syscall1(__NR_exit, 0);
+}