diff options
-rw-r--r-- | mono/metadata/ChangeLog | 12 | ||||
-rw-r--r-- | mono/metadata/assembly.c | 2 | ||||
-rw-r--r-- | mono/metadata/coree.c | 1 | ||||
-rw-r--r-- | mono/metadata/coree.h | 4 | ||||
-rw-r--r-- | mono/mini/ChangeLog | 7 | ||||
-rw-r--r-- | mono/mini/driver.c | 1 |
6 files changed, 23 insertions, 4 deletions
diff --git a/mono/metadata/ChangeLog b/mono/metadata/ChangeLog index 5c4a4bf495b..5a5eb95beb8 100644 --- a/mono/metadata/ChangeLog +++ b/mono/metadata/ChangeLog @@ -1,3 +1,15 @@ +2008-07-15 Jonathan Chambers <joncham@gmail.com> + + * assembly.c (mono_set_rootdir): Revert part of mixed + mode assembly patch to fix build. Use mono_module_handle + instead of linker specific __ImageBase. + + * coree.h: Add back mono_module_handle. + + * coree.c: Add back mono_module_handle. + + Code is contributed under MIT/X11 license. + 2008-07-15 Zoltan Varga <vargaz@gmail.com> * decimal.c (my_g_bit_nth_msf): Implement this directly without calling diff --git a/mono/metadata/assembly.c b/mono/metadata/assembly.c index 35be46708e2..fc893bdbc6c 100644 --- a/mono/metadata/assembly.c +++ b/mono/metadata/assembly.c @@ -551,7 +551,7 @@ mono_set_rootdir (void) #ifdef PLATFORM_WIN32 gchar *bindir, *installdir, *root, *name, *config; - name = mono_get_module_file_name ((HMODULE) &__ImageBase); + name = mono_get_module_file_name (mono_module_handle); bindir = g_path_get_dirname (name); installdir = g_path_get_dirname (bindir); root = g_build_path (G_DIR_SEPARATOR_S, installdir, "lib", NULL); diff --git a/mono/metadata/coree.c b/mono/metadata/coree.c index 7f3e0468052..da6c7b26464 100644 --- a/mono/metadata/coree.c +++ b/mono/metadata/coree.c @@ -33,6 +33,7 @@ #include "environment.h" #include "coree.h" +HMODULE mono_module_handle = NULL; HMODULE coree_module_handle = NULL; static gboolean init_from_coree = FALSE; diff --git a/mono/metadata/coree.h b/mono/metadata/coree.h index 56c81503116..42f11855fa6 100644 --- a/mono/metadata/coree.h +++ b/mono/metadata/coree.h @@ -22,9 +22,7 @@ STDAPI MonoFixupCorEE(HMODULE ModuleHandle); -/* Defined by the linker. */ -extern IMAGE_DOS_HEADER __ImageBase MONO_INTERNAL; - +extern HMODULE mono_module_handle MONO_INTERNAL; extern HMODULE coree_module_handle MONO_INTERNAL; HMODULE WINAPI MonoLoadImage(LPCWSTR FileName) MONO_INTERNAL; diff --git a/mono/mini/ChangeLog b/mono/mini/ChangeLog index 9ca923eb925..7155ed5996f 100644 --- a/mono/mini/ChangeLog +++ b/mono/mini/ChangeLog @@ -1,3 +1,10 @@ +2008-07-15 Jonathan Chambers <joncham@gmail.com> + + * driver.c: Add back mono_module_handle and + initialize in DllMain DLL_PROCESS_ATTACH case. + + Code is contributed under MIT/X11 license. + 2008-07-14 Zoltan Varga <vargaz@gmail.com> * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as diff --git a/mono/mini/driver.c b/mono/mini/driver.c index 933b5ac39e1..7499a272f10 100644 --- a/mono/mini/driver.c +++ b/mono/mini/driver.c @@ -1089,6 +1089,7 @@ BOOL APIENTRY DllMain (HMODULE module_handle, DWORD reason, LPVOID reserved) switch (reason) { case DLL_PROCESS_ATTACH: + mono_module_handle = module_handle; mono_install_runtime_load (mini_init); break; case DLL_PROCESS_DETACH: |