| Index: mojo/nacl/nexe_launcher_nonsfi.cc
|
| diff --git a/mojo/nacl/nexe_launcher_nonsfi.cc b/mojo/nacl/nexe_launcher_nonsfi.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..64d72fbcb4f0a8937ff94e0a5dd69a2dc4455876
|
| --- /dev/null
|
| +++ b/mojo/nacl/nexe_launcher_nonsfi.cc
|
| @@ -0,0 +1,26 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "mojo/nacl/nexe_launcher_nonsfi.h"
|
| +
|
| +#include "base/files/file_util.h"
|
| +#include "mojo/nacl/irt_mojo_nonsfi.h"
|
| +#include "mojo/public/c/system/types.h"
|
| +#include "native_client/src/public/irt_core.h"
|
| +#include "native_client/src/public/nonsfi/elf_loader.h"
|
| +
|
| +void launch_nexe_nonsfi(int fd, MojoHandle handle) {
|
| + // Run -- also, closes the fd, removing the temp file.
|
| + uintptr_t entry = NaClLoadElfFile(fd);
|
| +
|
| + nacl::MojoSetInitialHandle(handle);
|
| + int argc = 1;
|
| + char* argvp = const_cast<char*>("NaClMain");
|
| + char* envp = nullptr;
|
| + nacl_irt_nonsfi_entry(argc, &argvp, &envp,
|
| + reinterpret_cast<nacl_entry_func_t>(entry),
|
| + nacl::MojoIrtNonsfiQuery);
|
| + abort();
|
| + NOTREACHED();
|
| +}
|
|
|