| 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 namespace nacl { | |
| 14 | |
| 15 void MojoLaunchNexeNonsfi(int nexe_fd, MojoHandle initial_handle) { | |
| 16 // Run -- also, closes the nexe_fd, removing the temp file. | |
| 17 uintptr_t entry = NaClLoadElfFile(nexe_fd); | |
| 18 | |
| 19 MojoSetInitialHandle(initial_handle); | |
| 20 int argc = 1; | |
| 21 char* argvp = const_cast<char*>("NaClMain"); | |
| 22 char* envp = nullptr; | |
| 23 nacl_irt_nonsfi_entry(argc, &argvp, &envp, | |
| 24 reinterpret_cast<nacl_entry_func_t>(entry), | |
| 25 MojoIrtNonsfiQuery); | |
| 26 abort(); | |
| 27 NOTREACHED(); | |
| 28 } | |
| 29 | |
| 30 } // namespace nacl | |
| OLD | NEW |