blob: f37e9bead227184b265c48d9c605ee096d6fc361 [file] [log] [blame]
// Copyright 2018 The Fuchsia 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 <dlfcn.h>
#include <zircon/compiler.h>
#include <zircon/types.h>
// Loads a dynamic shared object stored in |vmo|.
// Acts identically to dlopen, but acts on a vmo
// instead of a file path.
// Does not take ownership of the input vmo.
void* dlopen_vmo(zx_handle_t vmo, int mode);
// Replace the handle to the "loader service" used to map names
// to VM objects for dlopen et al. This takes ownership of the
// given handle, and gives the caller ownership of the old handle
// in the return value.
zx_handle_t dl_set_loader_service(zx_handle_t new_svc);
// Ask the active "loader service" (if there is one), to return
// a new connection. Not all loader services need support this.
// On success, a channel handle to the new connection is returned
// via out.
zx_status_t dl_clone_loader_service(zx_handle_t* out);