1 #ifndef __MONO_UTILS_DL_H__
2 #define __MONO_UTILS_DL_H__
4 #include "mono/utils/mono-compiler.h"
5 #include "mono/utils/mono-dl-fallback.h"
8 #define MONO_SOLIB_EXT ".dll"
9 #elif defined(__ppc__) && defined(TARGET_MACH)
10 #define MONO_SOLIB_EXT ".dylib"
11 #elif defined(TARGET_MACH) && defined(TARGET_X86) && !defined(__native_client_codegen__)
12 #define MONO_SOLIB_EXT ".dylib"
13 #elif defined(TARGET_MACH) && defined(TARGET_AMD64) && !defined(__native_client_codegen__)
14 #define MONO_SOLIB_EXT ".dylib"
16 #define MONO_SOLIB_EXT ".so"
23 /* If not NULL, use the methods in MonoDlFallbackHandler instead of the LL_* methods */
24 MonoDlFallbackHandler
*dl_fallback
;
28 MonoDl
* mono_dl_open (const char *name
, int flags
, char **error_msg
) MONO_LLVM_INTERNAL
;
29 char* mono_dl_symbol (MonoDl
*module
, const char *name
, void **symbol
) MONO_LLVM_INTERNAL
;
30 void mono_dl_close (MonoDl
*module
) MONO_LLVM_INTERNAL
;
32 char* mono_dl_build_path (const char *directory
, const char *name
, void **iter
);
34 MonoDl
* mono_dl_open_runtime_lib (const char *lib_name
, int flags
, char **error_msg
);
37 //Platform API for mono_dl
38 const char* mono_dl_get_so_prefix (void);
39 const char** mono_dl_get_so_suffixes (void);
40 void* mono_dl_open_file (const char *file
, int flags
);
41 void mono_dl_close_handle (MonoDl
*module
);
42 void* mono_dl_lookup_symbol (MonoDl
*module
, const char *name
);
43 int mono_dl_convert_flags (int flags
);
44 char* mono_dl_current_error_string (void);
45 int mono_dl_get_executable_path (char *buf
, int buflen
);
46 const char* mono_dl_get_system_dir (void);
48 #endif /* __MONO_UTILS_DL_H__ */