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 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 /* | 9 /* |
10 * NaCl Simple/secure ELF loader (NaCl SEL). | 10 * NaCl Simple/secure ELF loader (NaCl SEL). |
(...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1168 * We cannot take the nap->mu lock, since NaClAppLoadFileDynamically | 1168 * We cannot take the nap->mu lock, since NaClAppLoadFileDynamically |
1169 * invokes NaClElfImageLoadDynamically which in turn invokes | 1169 * invokes NaClElfImageLoadDynamically which in turn invokes |
1170 * NaClSysMmapIntern resulting in a deadlock. This is not really | 1170 * NaClSysMmapIntern resulting in a deadlock. This is not really |
1171 * a problem since there is only one secure command channel, unless | 1171 * a problem since there is only one secure command channel, unless |
1172 * embedders invokes load_irt repeatedly, which is against the protocol. | 1172 * embedders invokes load_irt repeatedly, which is against the protocol. |
1173 * TODO(phosek): record load_module/load_irt state and return error | 1173 * TODO(phosek): record load_module/load_irt state and return error |
1174 * on repeated invocations (issue 3038). | 1174 * on repeated invocations (issue 3038). |
1175 */ | 1175 */ |
1176 | 1176 |
1177 suberr = NACL_FI_VAL("load_irt", NaClErrorCode, | 1177 suberr = NACL_FI_VAL("load_irt", NaClErrorCode, |
1178 NaClAppLoadFileDynamically(nap, load_src)); | 1178 NaClAppLoadFileDynamically(nap, load_src, NULL)); |
1179 (*NACL_VTBL(Gio, load_src)->Close)(load_src); | 1179 (*NACL_VTBL(Gio, load_src)->Close)(load_src); |
1180 | 1180 |
1181 if (LOAD_OK != suberr) { | 1181 if (LOAD_OK != suberr) { |
1182 NaClLog(LOG_FATAL, | 1182 NaClLog(LOG_FATAL, |
1183 "NaClLoadIrt: Failed to load the integrated runtime (IRT). " | 1183 "NaClLoadIrt: Failed to load the integrated runtime (IRT). " |
1184 "The user executable was probably not built to use the IRT.\n"); | 1184 "The user executable was probably not built to use the IRT.\n"); |
1185 } | 1185 } |
1186 nap->irt_loaded = 1; | 1186 nap->irt_loaded = 1; |
1187 rpc->result = NACL_SRPC_RESULT_OK; | 1187 rpc->result = NACL_SRPC_RESULT_OK; |
1188 | 1188 |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1559 nacl_global_xlate_base = mem_start; | 1559 nacl_global_xlate_base = mem_start; |
1560 | 1560 |
1561 NaClSandboxMemoryStartForValgrind(mem_start); | 1561 NaClSandboxMemoryStartForValgrind(mem_start); |
1562 | 1562 |
1563 _ovly_debug_event(); | 1563 _ovly_debug_event(); |
1564 } | 1564 } |
1565 | 1565 |
1566 void NaClGdbHook(struct NaClApp const *nap) { | 1566 void NaClGdbHook(struct NaClApp const *nap) { |
1567 StopForDebuggerInit(nap->mem_start); | 1567 StopForDebuggerInit(nap->mem_start); |
1568 } | 1568 } |
OLD | NEW |