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

Unified Diff: src/untrusted/nacl/nacl_irt.c

Issue 7276050: Change startup ABI for untrusted code to be C-compatible (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: disable bogus stack_frame.cc test for now Created 9 years, 6 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/nacl_irt.h ('k') | src/untrusted/nacl/nacl_startup.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/untrusted/nacl/nacl_irt.c
diff --git a/src/untrusted/nacl/nacl_irt.c b/src/untrusted/nacl/nacl_irt.c
index 23d351befad0fe1a35fdf4b20c13057adc44c279..fcd03650059244fb45dc31be0dbe46c276044f95 100644
--- a/src/untrusted/nacl/nacl_irt.c
+++ b/src/untrusted/nacl/nacl_irt.c
@@ -26,23 +26,6 @@ struct nacl_irt_blockhook __libnacl_irt_blockhook;
TYPE_nacl_irt_query __nacl_irt_query;
/*
- * TODO(mcgrathr): This extremely stupid function should not exist.
- * If the startup calling sequence were sane, this would be done
- * someplace that has the initial pointer locally rather than stealing
- * it from environ.
- * See http://code.google.com/p/nativeclient/issues/detail?id=651
- */
-static Elf32_auxv_t *find_auxv(void) {
- /*
- * This presumes environ has its startup-time value on the stack.
- */
- char **ep = environ;
- while (*ep != NULL)
- ++ep;
- return (void *) (ep + 1);
-}
-
-/*
* Scan the auxv for AT_SYSINFO, which is the pointer to the IRT query function.
* Stash that for later use.
*/
@@ -72,8 +55,8 @@ static void do_irt_query(const char *interface_ident,
* Initialize all our IRT function tables using the query function.
* The query function's address is passed via AT_SYSINFO in auxv.
*/
-void __libnacl_irt_init(void) {
- grok_auxv(find_auxv());
+void __libnacl_irt_init(Elf32_auxv_t *auxv) {
+ grok_auxv(auxv);
DO_QUERY(NACL_IRT_BASIC_v0_1, basic);
DO_QUERY(NACL_IRT_FILE_v0_1, file);
« no previous file with comments | « src/untrusted/nacl/nacl_irt.h ('k') | src/untrusted/nacl/nacl_startup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698