Index: tests/pnacl_dynamic_loading/dependencies_test.c |
diff --git a/tests/pnacl_dynamic_loading/dependencies_test.c b/tests/pnacl_dynamic_loading/dependencies_test.c |
new file mode 100644 |
index 0000000000000000000000000000000000000000..56539a8ec8d1261046e80e8f17ebdde9f4f103fc |
--- /dev/null |
+++ b/tests/pnacl_dynamic_loading/dependencies_test.c |
@@ -0,0 +1,37 @@ |
+/* |
+ * Copyright 2016 The Native Client Authors. All rights reserved. |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+#include <stdio.h> |
+ |
+/* |
+ * These functions would typically be declared in a shared header file, but for |
+ * testing convenience, they are defined here. |
+ */ |
+int get_module_a_var(); |
+int get_module_b_var(); |
+int get_module_c_var(); |
+ |
+/* |
+ * The loader should only need to load "dependencies_test", and the dependencies |
+ * should by loaded automatically by the pll_loader. |
+ * |
+ * | dependencies_test (depends on libc and test_pll_c) |
+ * | libc |
+ * * No dependencies |
+ * | test_pll_c (depends on test_pll_a and test_pll_b) |
+ * | test_pll_a |
+ * * No dependencies |
+ * | test_pll_b (depends on test_pll_a) |
+ * | test_pll_a |
+ * * No dependencies |
+ */ |
+ |
+int main(int argc, char* argv[]) { |
Mark Seaborn
2016/03/30 23:24:57
Use " *" spacing
Sean Klein
2016/04/01 23:12:24
Done.
|
+ printf("%d\n", get_module_a_var()); |
+ printf("%d\n", get_module_b_var()); |
+ printf("%d\n", get_module_c_var()); |
+ return 0; |
+} |