3 #if defined (HOST_WASM)
5 #include "mono/utils/mono-dl.h"
6 #include "mono/utils/mono-embed.h"
7 #include "mono/utils/mono-path.h"
17 mono_dl_get_so_prefix (void)
23 mono_dl_get_so_suffixes (void)
25 static const char *suffixes
[] = {
26 ".wasm", //we only recognize .wasm files for DSOs.
33 mono_dl_get_executable_path (char *buf
, int buflen
)
35 strncpy (buf
, "/managed", buflen
); //This is a packaging convertion that our tooling should enforce
40 mono_dl_get_system_dir (void)
47 mono_dl_lookup_symbol (MonoDl
*module
, const char *name
)
49 return dlsym(module
->handle
, name
);
53 mono_dl_current_error_string (void)
60 mono_dl_convert_flags (int flags
)
62 int lflags
= flags
& MONO_DL_LOCAL
? 0 : RTLD_GLOBAL
;
64 if (flags
& MONO_DL_LAZY
)
72 mono_dl_open_file (const char *file
, int flags
)
74 return dlopen(file
, flags
);
78 mono_dl_close_handle (MonoDl
*module
)
80 dlclose(module
->handle
);