Author: akhaldi
Date: Mon Apr 25 21:55:41 2011
New Revision: 51458
URL:
http://svn.reactos.org/svn/reactos?rev=51458&view=rev
Log:
[CRT/MINGW-W64]
* Call pei and __main before possible invocation of DllEntryPoint. By Kai Tietz.
Modified:
trunk/reactos/lib/3rdparty/mingw/crtdll.c
Modified: trunk/reactos/lib/3rdparty/mingw/crtdll.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/crtdll.…
==============================================================================
--- trunk/reactos/lib/3rdparty/mingw/crtdll.c [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/mingw/crtdll.c [iso-8859-1] Mon Apr 25 21:55:41 2011
@@ -179,6 +179,9 @@
retcode = FALSE;
goto i__leave;
}
+ _pei386_runtime_relocator ();
+ if (retcode && dwReason == DLL_PROCESS_ATTACH)
+ __main ();
if (dwReason == DLL_PROCESS_ATTACH || dwReason == DLL_THREAD_ATTACH)
{
retcode = DllEntryPoint (hDllHandle, dwReason, lpreserved);
@@ -187,9 +190,6 @@
if (! retcode)
goto i__leave;
}
- _pei386_runtime_relocator ();
- if (retcode && dwReason == DLL_PROCESS_ATTACH)
- __main ();
retcode = DllMain(hDllHandle,dwReason,lpreserved);
if ((dwReason == DLL_PROCESS_ATTACH) && ! retcode)
{