summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-11-06 22:11:41 -0500
committerpommicket <pommicket@gmail.com>2022-11-06 22:11:41 -0500
commit000f57e11cf3272951cd3463f5d8bb82bc8e3903 (patch)
tree2b2b0267b729de838340c8996cbcf746df6806fb /tests
parentdab85a8d1e9b99cbef225b8f5cc7fc001405828d (diff)
read symbol type
Diffstat (limited to 'tests')
-rw-r--r--tests/dylib-test.c12
-rw-r--r--tests/dylib.c4
-rw-r--r--tests/dylib.h8
3 files changed, 24 insertions, 0 deletions
diff --git a/tests/dylib-test.c b/tests/dylib-test.c
new file mode 100644
index 0000000..ae824b0
--- /dev/null
+++ b/tests/dylib-test.c
@@ -0,0 +1,12 @@
+#include "dylib.h"
+#include <stdlib.h>
+#include <stdio.h>
+
+void entry(void) {
+ the_number = 7;
+ printf("%d\n",the_number);
+ bigger();
+ printf("%d\n",the_number);
+
+ exit(0);
+}
diff --git a/tests/dylib.c b/tests/dylib.c
new file mode 100644
index 0000000..8da43a8
--- /dev/null
+++ b/tests/dylib.c
@@ -0,0 +1,4 @@
+#include "dylib.h"
+
+int the_number;
+void bigger() { the_number += 1; }
diff --git a/tests/dylib.h b/tests/dylib.h
new file mode 100644
index 0000000..3b5d369
--- /dev/null
+++ b/tests/dylib.h
@@ -0,0 +1,8 @@
+// here is a realyl great dynami library i made it myself
+#ifndef DYLIB_H_IS_REALLY_INCLUDED____
+#define DYLIB_H_IS_REALLY_INCLUDED____
+// ---------------dylib HEADER FILE ---------
+// /PLEASE INCLUDE IF YOU WANT TO USE dylib
+extern int the_number; // the number what it is
+void bigger(void); // make the number bigger by 1
+#endif // DYLIB_H_IS_REALLY_INCLUDED____