Index: /trunk/src/VBox/Runtime/r0drv/nt/dbgkrnlinfo-r0drv-nt.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r0drv/nt/dbgkrnlinfo-r0drv-nt.cpp	(revision 75274)
+++ /trunk/src/VBox/Runtime/r0drv/nt/dbgkrnlinfo-r0drv-nt.cpp	(revision 75275)
@@ -144,9 +144,5 @@
 /** Pointer to MmGetSystemRoutineAddress.
  * @note Added in NT v5.0. */
-#ifdef IPRT_TARGET_NT4
 static decltype(MmGetSystemRoutineAddress) *g_pfnMmGetSystemRoutineAddress = NULL;
-#else
-static decltype(MmGetSystemRoutineAddress) *g_pfnMmGetSystemRoutineAddress = MmGetSystemRoutineAddress;
-#endif
 /** Info about the ntoskrnl.exe mapping. */
 static RTDBGNTKRNLMODINFO   g_NtOsKrnlInfo = { "ntoskrnl.exe", NULL, NULL, false, 0, 0, 0, 0, 0, NULL, 0, 0, NULL, NULL };
@@ -348,4 +344,12 @@
 {
     RTR0DBG_NT_DEBUG_LOG(("rtR0DbgKrnlNtInit: pModInfo=%p\n", pModInfo));
+
+#ifndef IPRT_TARGET_NT4
+    /*
+     * Must manually initialize g_pfnMmGetSystemRoutineAddress, otherwise compiler
+     * generates its own dynamic init code that might not necessarily be called.
+     */
+    g_pfnMmGetSystemRoutineAddress = MmGetSystemRoutineAddress;
+#endif
 
     /*
