diff options
Diffstat (limited to 'ld/testsuite/ld-auto-import/dll.c')
-rw-r--r-- | ld/testsuite/ld-auto-import/dll.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ld/testsuite/ld-auto-import/dll.c b/ld/testsuite/ld-auto-import/dll.c new file mode 100644 index 0000000..ccf85e4 --- /dev/null +++ b/ld/testsuite/ld-auto-import/dll.c @@ -0,0 +1,20 @@ +int var = 123;
+int foo = 121;
+
+int var2[2]= { 123, 456 };
+
+#include <stdio.h>
+
+void
+print_var (void)
+{
+ printf ("DLL sees var = %d\n", var);
+}
+
+void
+print_foo (void)
+{
+ printf ("DLL sees foo = %d\n", foo);
+}
+
+void (* func_ptr)(void) = print_foo;
|