[fuchsia] Just use dlopen like on other OSes
SEC-42
Change-Id: I8c0781614e6cd711424df7a3f69f2efacc9bf31b
Reviewed-on: https://dart-review.googlesource.com/c/87162
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
diff --git a/runtime/bin/extensions_fuchsia.cc b/runtime/bin/extensions_fuchsia.cc
index a177c4c..64df6b6 100644
--- a/runtime/bin/extensions_fuchsia.cc
+++ b/runtime/bin/extensions_fuchsia.cc
@@ -24,17 +24,7 @@
"_kDartIsolateSnapshotInstructions";
void* Extensions::LoadExtensionLibrary(const char* library_file) {
- int fd = open(library_file, O_RDONLY);
- if (fd < 0) {
- return NULL;
- }
- zx_handle_t vmo;
- zx_status_t status = fdio_get_vmo_clone(fd, &vmo);
- close(fd);
- if (status != ZX_OK) {
- return NULL;
- }
- return dlopen_vmo(vmo, RTLD_LAZY);
+ return dlopen(library_file, RTLD_LAZY);
}
void* Extensions::ResolveSymbol(void* lib_handle, const char* symbol) {