Index: runtime/bin/dartutils.cc |
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc |
index 396b116fdd6d6dadb4b3fff83cba50a42d8796e2..e180479bccbdf498047d151f1e11bbde78345d7f 100644 |
--- a/runtime/bin/dartutils.cc |
+++ b/runtime/bin/dartutils.cc |
@@ -180,6 +180,17 @@ bool DartUtils::IsDartBuiltinLibURL(const char* url_name) { |
} |
+void* DartUtils::MapExecutable(const char* name, intptr_t* len) { |
+ File* file = File::Open(name, File::kRead); |
+ if (file == NULL) { |
+ return NULL; |
+ } |
+ void* addr = file->MapExecutable(len); |
+ file->Release(); |
+ return addr; |
+} |
+ |
+ |
void* DartUtils::OpenFile(const char* name, bool write) { |
File* file = File::Open(name, write ? File::kWriteTruncate : File::kRead); |
return reinterpret_cast<void*>(file); |