Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Unified Diff: tests/stacked_irt/irt_hello_world.c

Issue 25027006: Stackable IRT Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/untrusted/nacl/start.c ('k') | tests/stacked_irt/irt_hello_world.stdout » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
+}
« no previous file with comments | « src/untrusted/nacl/start.c ('k') | tests/stacked_irt/irt_hello_world.stdout » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698