| 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..58ba5ca34cd946da16b6e187686ff424264382c1 100644
|
| --- a/src/trusted/service_runtime/sel_main.c
|
| +++ b/src/trusted/service_runtime/sel_main.c
|
| @@ -678,18 +678,28 @@ 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, when the nexe does not follow NaCl's stable ABI.
|
| + */
|
| + NaClLog(LOG_WARNING,
|
| + "Main executable has no segment gap; not loading IRT library. "
|
| + "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 *)
|
|
|