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

Unified Diff: src/trusted/service_runtime/sel_main.c

Issue 10681005: Allow sel_ldr to continue without the IRT, when nexe doesn't have segment gap (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: address review comments Created 8 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
Index: src/trusted/service_runtime/sel_main.c
diff --git a/src/trusted/service_runtime/sel_main.c b/src/trusted/service_runtime/sel_main.c
index 35a9b14dfb497aa509b42eb1253de2f0cbe995d5..90e4736a0a1e56439a815b8df5d8e9d7175d39ae 100644
--- a/src/trusted/service_runtime/sel_main.c
+++ b/src/trusted/service_runtime/sel_main.c
@@ -678,18 +678,29 @@ int main(int argc,
NaClGdbHook(&state);
}
-
if (NULL != blob_library_file) {
if (LOAD_OK == errcode) {
- NaClLog(2, "Loading blob file %s\n", blob_library_file);
- errcode = NaClAppLoadFileDynamically(nap, (struct Gio *) &blob_file);
- if (LOAD_OK != errcode) {
- fprintf(stderr, "Error while loading \"%s\": %s\n",
- blob_library_file,
- NaClErrorString(errcode));
+ if (NULL != nap->text_shm) {
+ NaClLog(2, "Loading blob file %s\n", blob_library_file);
+ errcode = NaClAppLoadFileDynamically(nap, (struct Gio *) &blob_file);
+ if (LOAD_OK != errcode) {
+ fprintf(stderr, "Error while loading \"%s\": %s\n",
+ blob_library_file,
+ NaClErrorString(errcode));
+ }
+ NaClPerfCounterMark(&time_all_main, "BlobLoaded");
+ NaClPerfCounterIntervalLast(&time_all_main);
+ } else {
+ /*
+ * TODO(mseaborn): Omit -B when the IRT is not wanted (e.g., from
+ * sel_ldr_launcher_standalone), instead of looking for the absence
+ * of a segment gap, to provide better diagnostics when the linker
Mark Seaborn 2012/06/28 22:50:55 maybe: "when the nexe does not follow NaCl's stabl
jvoung - send to chromium... 2012/06/28 23:02:50 Done.
+ * did not create a segment gap!
+ */
+ NaClLog(LOG_WARNING,
+ "Main executable has no segment gap; not loading IRT library.\n"
Mark Seaborn 2012/06/28 22:50:55 Can you keep the warning all on one line, please?
jvoung - send to chromium... 2012/06/28 23:02:50 Done.
+ "This is expected for PNaCl's translator nexes.\n");
}
- NaClPerfCounterMark(&time_all_main, "BlobLoaded");
- NaClPerfCounterIntervalLast(&time_all_main);
}
if (-1 == (*((struct Gio *) &blob_file)->vtbl->Close)((struct Gio *)
« no previous file with comments | « no previous file | src/trusted/service_runtime/sel_main_chrome.c » ('j') | src/trusted/service_runtime/sel_main_chrome.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698