| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2011 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 "native_client/src/include/portability.h" | 7 #include "native_client/src/include/portability.h" |
| 8 #include "native_client/src/include/portability_io.h" | 8 #include "native_client/src/include/portability_io.h" |
| 9 | 9 |
| 10 #if NACL_OSX | 10 #if NACL_OSX |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 */ | 243 */ |
| 244 if (LOAD_OK != errcode) { | 244 if (LOAD_OK != errcode) { |
| 245 goto done; | 245 goto done; |
| 246 } | 246 } |
| 247 | 247 |
| 248 /* | 248 /* |
| 249 * Enable debugging if requested. | 249 * Enable debugging if requested. |
| 250 */ | 250 */ |
| 251 nap->enable_debug_stub = debug; | 251 nap->enable_debug_stub = debug; |
| 252 | 252 |
| 253 NaClEnvCleanserCtor(&env_cleanser); | 253 NaClEnvCleanserCtor(&env_cleanser, 1); |
| 254 if (!NaClEnvCleanserInit(&env_cleanser, envp)) { | 254 if (!NaClEnvCleanserInit(&env_cleanser, envp, NULL)) { |
| 255 NaClLog(LOG_FATAL, "Failed to initialise env cleanser\n"); | 255 NaClLog(LOG_FATAL, "Failed to initialise env cleanser\n"); |
| 256 } | 256 } |
| 257 | 257 |
| 258 /* | 258 /* |
| 259 * only nap->ehdrs.e_entry is usable, no symbol table is | 259 * only nap->ehdrs.e_entry is usable, no symbol table is |
| 260 * available. | 260 * available. |
| 261 */ | 261 */ |
| 262 if (!NaClCreateMainThread(nap, ac, av, | 262 if (!NaClCreateMainThread(nap, ac, av, |
| 263 NaClEnvCleanserEnvironment(&env_cleanser))) { | 263 NaClEnvCleanserEnvironment(&env_cleanser))) { |
| 264 fprintf(stderr, "creating main thread failed\n"); | 264 fprintf(stderr, "creating main thread failed\n"); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 276 */ | 276 */ |
| 277 return ret_code; | 277 return ret_code; |
| 278 | 278 |
| 279 done: | 279 done: |
| 280 fflush(stdout); | 280 fflush(stdout); |
| 281 | 281 |
| 282 NaClAllModulesFini(); | 282 NaClAllModulesFini(); |
| 283 | 283 |
| 284 return ret_code; | 284 return ret_code; |
| 285 } | 285 } |
| OLD | NEW |