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

Unified Diff: src/untrusted/irt/irt_core_entry.c

Issue 19571003: IRT: Replace __attribute__((constructor)) with explicit call in _start() (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Fix + cleanup Created 7 years, 5 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/irt/irt.gyp ('k') | src/untrusted/irt/irt_entry.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/untrusted/irt/irt_core_entry.c
diff --git a/src/untrusted/irt/irt_core_entry.c b/src/untrusted/irt/irt_core_entry.c
deleted file mode 100644
index 265ae51e5ae8e26179b08b9489b107bc560f7287..0000000000000000000000000000000000000000
--- a/src/untrusted/irt/irt_core_entry.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2012 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>
-
-#include "native_client/src/shared/platform/nacl_log.h"
-#include "native_client/src/shared/srpc/nacl_srpc.h"
-
-/*
- * This is declared as weak because plugin_main_nacl.cc on the
- * Chromium side has a copy of IrtInit().
- * TODO(mseaborn): Remove IrtInit() from there and use this copy.
- */
-__attribute__((weak))
-int IrtInit(void) {
- static int initialized = 0;
- if (initialized) {
- return 0;
- }
- if (!NaClSrpcModuleInit()) {
- return 1;
- }
- NaClLogModuleInit(); /* Enable NaClLog'ing used by CHECK(). */
- initialized = 1;
- return 0;
-}
-
-static __attribute__((constructor)) void CallIrtInit(void) {
- if (IrtInit()) {
- static const char fatal_msg[] =
- "irt initialization (IRTInit) failed.\n";
- write(2, fatal_msg, sizeof(fatal_msg) - 1);
- _exit(-1);
- }
-}
« no previous file with comments | « src/untrusted/irt/irt.gyp ('k') | src/untrusted/irt/irt_entry.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698