Revert r107993 and coree.h: Define __ImageBase as _image_base__ on cygwin that fixes...
authorKornél Pál <kornelpal@gmail.com>
Wed, 16 Jul 2008 22:17:21 +0000 (22:17 -0000)
committerKornél Pál <kornelpal@gmail.com>
Wed, 16 Jul 2008 22:17:21 +0000 (22:17 -0000)
svn path=/trunk/mono/; revision=108091

mono/metadata/ChangeLog
mono/metadata/assembly.c
mono/metadata/coree.c
mono/metadata/coree.h
mono/mini/ChangeLog
mono/mini/driver.c

index 6ef122563a08af81de9cf07142ac9db5b18d7c86..984a39c12b3b28470a5027760cb5672e1a1d435d 100644 (file)
@@ -1,3 +1,10 @@
+2008-07-16  Kornél Pál  <kornelpal@gmail.com>
+
+       * coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
+       old ld versions.
+
+       Contributed under MIT/X11 license.
+
 2008-07-16 Rodrigo Kumpera  <rkumpera@novell.com>
 
        * string-icalls.c (ves_icall_System_String_InternalSplit):
        vtable when possible. Reduces locking contention on reflection heavy
        code.
 
-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
index fc893bdbc6cd9d8872b3d58b1f1cf0456fcfdd41..35be46708e27b57451503d50128262b7e46ca03d 100644 (file)
@@ -551,7 +551,7 @@ mono_set_rootdir (void)
 #ifdef PLATFORM_WIN32
        gchar *bindir, *installdir, *root, *name, *config;
 
-       name = mono_get_module_file_name (mono_module_handle);
+       name = mono_get_module_file_name ((HMODULE) &__ImageBase);
        bindir = g_path_get_dirname (name);
        installdir = g_path_get_dirname (bindir);
        root = g_build_path (G_DIR_SEPARATOR_S, installdir, "lib", NULL);
index da6c7b264640113360c28764db31eb4f3678ae3a..7f3e0468052e6cfc7003bfc5308037df7eb5a27d 100644 (file)
@@ -33,7 +33,6 @@
 #include "environment.h"
 #include "coree.h"
 
-HMODULE mono_module_handle = NULL;
 HMODULE coree_module_handle = NULL;
 
 static gboolean init_from_coree = FALSE;
index 42f11855fa636c439592442b7cf5bb516f433249..63c4eb10e98048c895ac6cf24e8469eb95a52f44 100644 (file)
 
 STDAPI MonoFixupCorEE(HMODULE ModuleHandle);
 
-extern HMODULE mono_module_handle MONO_INTERNAL;
+/* Defined by the linker. */
+#ifndef _MSC_VER
+#define __ImageBase _image_base__
+#endif
+extern IMAGE_DOS_HEADER __ImageBase MONO_INTERNAL;
+
 extern HMODULE coree_module_handle MONO_INTERNAL;
 
 HMODULE WINAPI MonoLoadImage(LPCWSTR FileName) MONO_INTERNAL;
index aa5eef46092074483d695f7b864ddd9a0dd445d2..3fa34ce04b89c1765b046ca0bcb5274d0997a494 100644 (file)
@@ -7,13 +7,6 @@
        * mini.c (mini_method_compile): Don't add the method to the jit info tables
        during aot compilation.
 
-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 
index 7499a272f10724bfebd6724a2e5df0a99d0c90f5..933b5ac39e12cd116f9b6e37987bdf2a701eab68 100644 (file)
@@ -1089,7 +1089,6 @@ 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: