Index: tests/stacked_irt/irt_hello_world.c |
diff --git a/tests/stacked_irt/irt_hello_world.c b/tests/stacked_irt/irt_hello_world.c |
new file mode 100644 |
index 0000000000000000000000000000000000000000..74c05cf7000b59791d514f5919b15e0ad2fc02b9 |
--- /dev/null |
+++ b/tests/stacked_irt/irt_hello_world.c |
@@ -0,0 +1,42 @@ |
+/* |
+ * Copyright 2013 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> |
+ |
+#include "native_client/src/untrusted/irt/irt.h" |
+#include "native_client/src/untrusted/irt/irt_interfaces.h" |
+ |
+#include "native_client/tests/stacked_irt/irt_trace.h" |
+ |
+/* |
+void (*const preinit_array []) (void) |
+ __attribute__ ((section(".preinit_array"), |
+ aligned(sizeof(void *)))) = { |
+ &irt_logged_init |
+}; |
+ |
+void (*const fini_array []) (void) |
+ __attribute__ ((section(".fini_array"), |
+ aligned(sizeof(void *)))) = { |
+ &irt_logged_fini |
+}; |
+*/ |
+ |
+/* |
+struct nacl_irt_module nacl_irt_array[] = { |
+ { irt_logged_module_init, irt_logged_module_fini }, |
+ { NULL, NULL } |
+}; |
+*/ |
+ |
+void hello_world(void) { |
+ printf("Hello, World!\n"); |
+} |
+ |
+int main(int argc, char* argv[]) { |
+ hello_world(); |
+ return 0; |
+} |