OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "mojo/nacl/nexe_launcher_nonsfi.h" |
| 6 |
| 7 #include "base/files/file_util.h" |
| 8 #include "mojo/nacl/irt_mojo_nonsfi.h" |
| 9 #include "mojo/public/c/system/types.h" |
| 10 #include "native_client/src/public/irt_core.h" |
| 11 #include "native_client/src/public/nonsfi/elf_loader.h" |
| 12 |
| 13 void launch_nexe_nonsfi(int fd, MojoHandle handle) { |
| 14 // Run -- also, closes the fd, removing the temp file. |
| 15 uintptr_t entry = NaClLoadElfFile(fd); |
| 16 |
| 17 nacl::MojoSetInitialHandle(handle); |
| 18 int argc = 1; |
| 19 char* argvp = const_cast<char*>("NaClMain"); |
| 20 char* envp = nullptr; |
| 21 nacl_irt_nonsfi_entry(argc, &argvp, &envp, |
| 22 reinterpret_cast<nacl_entry_func_t>(entry), |
| 23 nacl::MojoIrtNonsfiQuery); |
| 24 abort(); |
| 25 NOTREACHED(); |
| 26 } |
OLD | NEW |