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

Unified Diff: src/minsfi/untrusted/start.c

Issue 546883003: MinSFI: Passing arguments to the entry function (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Created 6 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/minsfi/untrusted/nacl.scons ('k') | tests/minsfi/nacl.scons » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/minsfi/untrusted/start.c
diff --git a/src/minsfi/untrusted/start.c b/src/minsfi/untrusted/start.c
new file mode 100644
index 0000000000000000000000000000000000000000..a2c3ad82d9ce6eddfa0d775f43a1b167f3941345
--- /dev/null
+++ b/src/minsfi/untrusted/start.c
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2014 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 <unistd.h>
+
+extern int main(int argc, char **argv);
+
+/*
+ * This is the true entry point for untrusted code.
+ * See comments in native_client/src/include/minsfi_priv.h for the layout of
+ * the 'info' data structure.
+ */
+int _start(uint32_t info[]) {
+ int argc = info[0];
+ char **argv = (char**) (info + 1);
+
+ return main(argc, argv);
+}
« no previous file with comments | « src/minsfi/untrusted/nacl.scons ('k') | tests/minsfi/nacl.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698