diff --git a/reactos/lib/3rdparty/mingw/crtexe.c b/reactos/lib/3rdparty/mingw/crtexe.c index d247c8a07c1..6b56ff322b8 100644 --- a/reactos/lib/3rdparty/mingw/crtexe.c +++ b/reactos/lib/3rdparty/mingw/crtexe.c @@ -202,7 +202,9 @@ __mingw_CRTStartup (void) if (__dyn_tls_init_callback != NULL && _IsNonwritableInCurrentImage ((PBYTE) &__dyn_tls_init_callback)) __dyn_tls_init_callback (NULL, DLL_THREAD_ATTACH, NULL); +#if defined(__i386__) || defined(__x86_64__) _pei386_runtime_relocator (); +#endif #if defined(__x86_64__) __asm__ __volatile__ ( diff --git a/reactos/lib/3rdparty/mingw/mingw.rbuild b/reactos/lib/3rdparty/mingw/mingw.rbuild index 3d004dc5e52..c0d8bbfb298 100644 --- a/reactos/lib/3rdparty/mingw/mingw.rbuild +++ b/reactos/lib/3rdparty/mingw/mingw.rbuild @@ -1,7 +1,7 @@ - + include CRT_fp10.c diff --git a/reactos/lib/3rdparty/mingw/pseudo-reloc.c b/reactos/lib/3rdparty/mingw/pseudo-reloc.c index 66425e34ea2..c3e3b6b1c64 100644 --- a/reactos/lib/3rdparty/mingw/pseudo-reloc.c +++ b/reactos/lib/3rdparty/mingw/pseudo-reloc.c @@ -12,6 +12,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ +/* Only necesary on x86 and amd64 targets */ +#if defined(__i386__) || defined(__x86_64__) + #include extern char __RUNTIME_PSEUDO_RELOC_LIST__; @@ -44,3 +47,4 @@ _pei386_runtime_relocator () &__RUNTIME_PSEUDO_RELOC_LIST_END__, &_image_base__); } +#endif