[wasm] Add comments explaining the magic strings in mono-dl-wasm.c
[mono.git] / mono / utils / mono-dl-wasm.c
1 #include <config.h>
2
3 #if defined (HOST_WASM)
4
5 #include "mono/utils/mono-dl.h"
6 #include "mono/utils/mono-embed.h"
7 #include "mono/utils/mono-path.h"
8
9 #include <stdlib.h>
10 #include <stdio.h>
11 #include <ctype.h>
12 #include <string.h>
13 #include <glib.h>
14
15 const char *
16 mono_dl_get_so_prefix (void)
17 {
18         return "";
19 }
20
21 const char **
22 mono_dl_get_so_suffixes (void)
23 {
24         static const char *suffixes[] = {
25                 ".wasm", //we only recognize .wasm files for DSOs.
26                 "",
27         };
28         return suffixes;
29 }
30
31 int
32 mono_dl_get_executable_path (char *buf, int buflen)
33 {
34         strncpy (buf, "/managed", buflen); //This is a packaging convertion that our tooling should enforce
35         return 0;
36 }
37
38 const char*
39 mono_dl_get_system_dir (void)
40 {
41         return NULL;
42 }
43
44
45 void*
46 mono_dl_lookup_symbol (MonoDl *module, const char *name)
47 {
48         return NULL;
49 }
50
51 char*
52 mono_dl_current_error_string (void)
53 {
54         return g_strdup ("");
55 }
56
57
58 int
59 mono_dl_convert_flags (int flags)
60 {
61         return flags;
62 }
63
64 void *
65 mono_dl_open_file (const char *file, int flags)
66 {
67         return NULL;
68 }
69
70 void
71 mono_dl_close_handle (MonoDl *module)
72 {
73         //nothing to do
74 }
75
76 #endif