| 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 <assert.h> | 7 #include <assert.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <iterator> | 10 #include <iterator> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 void SelLdrLauncherStandalone::BuildCommandLine(vector<nacl::string>* command) { | 53 void SelLdrLauncherStandalone::BuildCommandLine(vector<nacl::string>* command) { |
| 54 assert(sel_ldr_ != NACL_NO_FILE_PATH); // Set by InitCommandLine(). | 54 assert(sel_ldr_ != NACL_NO_FILE_PATH); // Set by InitCommandLine(). |
| 55 if (!command_prefix_.empty()) | 55 if (!command_prefix_.empty()) |
| 56 command->insert(command->end(), | 56 command->insert(command->end(), |
| 57 command_prefix_.begin(), command_prefix_.end()); | 57 command_prefix_.begin(), command_prefix_.end()); |
| 58 if (!sel_ldr_bootstrap_.empty()) | 58 if (!sel_ldr_bootstrap_.empty()) |
| 59 command->push_back(sel_ldr_bootstrap_); | 59 command->push_back(sel_ldr_bootstrap_); |
| 60 command->push_back(sel_ldr_); | 60 command->push_back(sel_ldr_); |
| 61 if (!sel_ldr_bootstrap_.empty()) { | 61 if (!sel_ldr_bootstrap_.empty()) { |
| 62 command->push_back("--r_debug=0xXXXXXXXXXXXXXXXX"); | 62 command->push_back("--r_debug=0xXXXXXXXXXXXXXXXX"); |
| 63 command->push_back("--reserved_at_zero=0xXXXXXXXX"); | 63 command->push_back("--reserved_at_zero=0xXXXXXXXXXXXXXXXX"); |
| 64 } | 64 } |
| 65 command->push_back("-R"); // RPC will be used to point to the nexe. | 65 command->push_back("-R"); // RPC will be used to point to the nexe. |
| 66 | 66 |
| 67 command->insert(command->end(), sel_ldr_argv_.begin(), sel_ldr_argv_.end()); | 67 command->insert(command->end(), sel_ldr_argv_.begin(), sel_ldr_argv_.end()); |
| 68 | 68 |
| 69 struct NaClEnvCleanser env_cleanser; | 69 struct NaClEnvCleanser env_cleanser; |
| 70 NaClEnvCleanserCtor(&env_cleanser, 1); | 70 NaClEnvCleanserCtor(&env_cleanser, 1); |
| 71 if (!NaClEnvCleanserInit(&env_cleanser, GetEnviron(), NULL)) { | 71 if (!NaClEnvCleanserInit(&env_cleanser, GetEnviron(), NULL)) { |
| 72 NaClLog(LOG_FATAL, "Failed to initialise env cleanser\n"); | 72 NaClLog(LOG_FATAL, "Failed to initialise env cleanser\n"); |
| 73 } | 73 } |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 args_for_sel_ldr.push_back("-B"); | 142 args_for_sel_ldr.push_back("-B"); |
| 143 args_for_sel_ldr.push_back(irt_library_path); | 143 args_for_sel_ldr.push_back(irt_library_path); |
| 144 } | 144 } |
| 145 if (!StartViaCommandLine(prefix, args_for_sel_ldr, args_for_nexe)) { | 145 if (!StartViaCommandLine(prefix, args_for_sel_ldr, args_for_nexe)) { |
| 146 return false; | 146 return false; |
| 147 } | 147 } |
| 148 return true; | 148 return true; |
| 149 } | 149 } |
| 150 | 150 |
| 151 } // namespace nacl | 151 } // namespace nacl |
| OLD | NEW |