commit
bba5c8a39a
109 files changed
+14085
No files matched your search
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace voidlibc::loader::macos_handoff {
|
||||
|
||||
struct LoadResult {
|
||||
void* dl_handle = nullptr;
|
||||
std::string error;
|
||||
bool ok = false;
|
||||
};
|
||||
|
||||
// Write `blob` to a per-process temp file under $TMPDIR and call dlopen on it.
|
||||
// The temp file is unlinked after dlopen succeeds (the mapping keeps the data alive).
|
||||
// Returns a native dlopen handle on success.
|
||||
LoadResult dlopen_buffer(const std::vector<std::uint8_t>& blob);
|
||||
|
||||
void* sym(void* handle, const char* name);
|
||||
int close_(void* handle);
|
||||
|
||||
} // namespace voidlibc::loader::macos_handoff
|
||||
Reference in new issue
Block a user