OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 /* | 7 /* |
8 * NaCl Simple/secure ELF loader (NaCl SEL). | 8 * NaCl Simple/secure ELF loader (NaCl SEL). |
9 */ | 9 */ |
10 #include "native_client/src/include/portability.h" | 10 #include "native_client/src/include/portability.h" |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 */ | 704 */ |
705 if (!NaClAclBypassChecks && g_enable_outer_sandbox_func != NULL) { | 705 if (!NaClAclBypassChecks && g_enable_outer_sandbox_func != NULL) { |
706 g_enable_outer_sandbox_func(); | 706 g_enable_outer_sandbox_func(); |
707 } | 707 } |
708 | 708 |
709 if (NULL != blob_library_file) { | 709 if (NULL != blob_library_file) { |
710 if (nap->irt_loaded) { | 710 if (nap->irt_loaded) { |
711 NaClLog(LOG_INFO, "IRT loaded via command channel; ignoring -B irt\n"); | 711 NaClLog(LOG_INFO, "IRT loaded via command channel; ignoring -B irt\n"); |
712 } else if (LOAD_OK == errcode) { | 712 } else if (LOAD_OK == errcode) { |
713 NaClLog(2, "Loading blob file %s\n", blob_library_file); | 713 NaClLog(2, "Loading blob file %s\n", blob_library_file); |
714 errcode = NaClAppLoadFileDynamically(nap, (struct Gio *) &blob_file); | 714 errcode = NaClAppLoadFileDynamically(nap, (struct Gio *) &blob_file, |
| 715 NULL); |
715 if (LOAD_OK == errcode) { | 716 if (LOAD_OK == errcode) { |
716 nap->irt_loaded = 1; | 717 nap->irt_loaded = 1; |
717 } else { | 718 } else { |
718 fprintf(stderr, "Error while loading \"%s\": %s\n", | 719 fprintf(stderr, "Error while loading \"%s\": %s\n", |
719 blob_library_file, | 720 blob_library_file, |
720 NaClErrorString(errcode)); | 721 NaClErrorString(errcode)); |
721 } | 722 } |
722 NaClPerfCounterMark(&time_all_main, "BlobLoaded"); | 723 NaClPerfCounterMark(&time_all_main, "BlobLoaded"); |
723 NaClPerfCounterIntervalLast(&time_all_main); | 724 NaClPerfCounterIntervalLast(&time_all_main); |
724 } | 725 } |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
847 fflush(stdout); | 848 fflush(stdout); |
848 | 849 |
849 if (handle_signals) NaClSignalHandlerFini(); | 850 if (handle_signals) NaClSignalHandlerFini(); |
850 NaClAllModulesFini(); | 851 NaClAllModulesFini(); |
851 | 852 |
852 NaClExit(ret_code); | 853 NaClExit(ret_code); |
853 | 854 |
854 /* Unreachable, but having the return prevents a compiler error. */ | 855 /* Unreachable, but having the return prevents a compiler error. */ |
855 return ret_code; | 856 return ret_code; |
856 } | 857 } |
OLD | NEW |