77 auto flags = fuchsia::io::OpenFlags::RIGHT_READABLE;
79 flags |= fuchsia::io::OpenFlags::RIGHT_EXECUTABLE;
85 const zx_status_t status =
86 fdio_open_fd(path,
static_cast<uint32_t
>(
flags), &fd);
87 if (status != ZX_OK) {
93 std::initializer_list<Protection> protection_execute = {Protection::kRead,
94 Protection::kExecute};
95 std::initializer_list<Protection> protection_read = {Protection::kRead};
96 auto mapping = std::make_unique<fml::FileMapping>(
97 fml::UniqueFD{fd}, executable ? protection_execute : protection_read);
99 if (!mapping->IsValid()) {
static const uint8_t buffer[]