Index: /trunk/src/VBox/HostDrivers/Support/Makefile.kmk
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/Makefile.kmk	(revision 25259)
+++ /trunk/src/VBox/HostDrivers/Support/Makefile.kmk	(revision 25260)
@@ -84,4 +84,7 @@
         $(if $(VBOX_WITH_SUPSVC),VBOX_WITH_SUPSVC) \
         $(if $(VBOX_WITH_MAIN),VBOX_WITH_MAIN,)
+ifdef VBOX_WITH_NATIVE_R0_LOADER
+ SUPR3_DEFS        += VBOX_WITH_NATIVE_R0_LOADER
+endif
 SUPR3_INCS         := $(PATH_SUB_CURRENT)
 SUPR3_INCS.l4       = $(L4_INCDIR)
@@ -102,4 +105,7 @@
 	$(if $(VBOX_WITH_SUPSVC),VBOX_WITH_SUPSVC,) \
 	$(if $(VBOX_WITH_MAIN),VBOX_WITH_MAIN,)
+ifdef VBOX_WITH_NATIVE_R0_LOADER
+ SUPR3HardenedStatic_DEFS   += VBOX_WITH_NATIVE_R0_LOADER
+endif
 SUPR3HardenedStatic_INCS     = .
 SUPR3HardenedStatic_SOURCES  = \
@@ -172,4 +178,7 @@
 ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
 VBoxDrv_DEFS         += VBOX_WITH_VMMR0_DISABLE_PREEMPTION
+endif
+ifdef VBOX_WITH_NATIVE_R0_LOADER
+ VBoxDrv_DEFS        += VBOX_WITH_NATIVE_R0_LOADER
 endif
 VBoxDrv_SDKS          = W2K3DDK WINPSDKINCS
@@ -228,4 +237,7 @@
 vboxdrv_DEFS         += EXPORT_SYMTAB
 endif
+ifdef VBOX_WITH_NATIVE_R0_LOADER
+ VBoxDrv_DEFS        += VBOX_WITH_NATIVE_R0_LOADER
+endif
 vboxdrv_INCS         := \
 	$(PATH_SUB_CURRENT) \
@@ -314,4 +326,7 @@
 VBoxDrvTiger_INST        = $(INST_VBOXDRV_TIGER)Contents/MacOS/
 VBoxDrvTiger_DEFS       := IN_RT_R0 IN_SUP_R0 SUPDRV_WITH_RELEASE_LOGGER VBOX_SVN_REV=$(VBOX_SVN_REV)
+ifdef VBOX_WITH_NATIVE_R0_LOADER
+ VBoxDrvTiger_DEFS      += VBOX_WITH_NATIVE_R0_LOADER
+endif
 VBoxDrvTiger_DEFS.debug += DEBUG_DARWIN_GIP
 VBoxDrvTiger_INCS        = .
@@ -379,4 +394,7 @@
 VBoxDrv_TEMPLATE      = VBOXR0DRV
 VBoxDrv_DEFS          = IN_RT_R0 IN_SUP_R0
+ifdef VBOX_WITH_NATIVE_R0_LOADER
+ VBoxDrv_DEFS        += VBOX_WITH_NATIVE_R0_LOADER
+endif
 VBoxDrv_INCS         := $(PATH_SUB_CURRENT)
 #VBoxDrv_LDFLAGS       = -s -t -v
@@ -395,4 +413,7 @@
 VBoxDrvLib_NOINST     = 1
 VBoxDrvLib_DEFS       = IN_RT_R0 IN_SUP_R0
+ifdef VBOX_WITH_NATIVE_R0_LOADER
+ VBoxDrvLib_DEFS     += VBOX_WITH_NATIVE_R0_LOADER
+endif
 VBoxDrvLib_INCS      := \
 	. \
@@ -411,4 +432,7 @@
 vboxdrv_TEMPLATE      = VBOXR0DRV
 vboxdrv_DEFS          = IN_RT_R0 IN_SUP_R0 SUPDRV_WITH_RELEASE_LOGGER VBOX_SVN_REV=$(VBOX_SVN_REV)
+ifdef VBOX_WITH_NATIVE_R0_LOADER
+ vboxdrv_DEFS        += VBOX_WITH_NATIVE_R0_LOADER
+endif
 vboxdrv_INCS         := $(PATH_SUB_CURRENT)
 vboxdrv_LIBS          = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
@@ -454,4 +478,7 @@
 endif
 vboxdrv_DEFS         += VBOX_SVN_REV=$(VBOX_SVN_REV)
+ifdef VBOX_WITH_NATIVE_R0_LOADER
+ vboxdrv_DEFS        += VBOX_WITH_NATIVE_R0_LOADER
+endif
 vboxdrv_DEPS         += $(VBOX_SVN_REV_KMK)
 vboxdrv_INCS         := $(PATH_SUB_CURRENT)
Index: /trunk/src/VBox/HostDrivers/Support/SUPDrv.c
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPDrv.c	(revision 25259)
+++ /trunk/src/VBox/HostDrivers/Support/SUPDrv.c	(revision 25260)
@@ -1290,5 +1290,5 @@
             REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, pReq->u.In.cbImageWithTabs > 0);
             REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, pReq->u.In.cbImageWithTabs < 16*_1M);
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
             REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, pReq->u.In.cbImageBits > 0);
             REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, pReq->u.In.cbImageBits > 0);
@@ -1298,5 +1298,5 @@
             REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, memchr(pReq->u.In.szName, '\0', sizeof(pReq->u.In.szName)));
             REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, !supdrvCheckInvalidChar(pReq->u.In.szName, ";:()[]{}/\\|&*%#@!~`\"'"));
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
             REQ_CHECK_EXPR(SUP_IOCTL_LDR_OPEN, memchr(pReq->u.In.szFilename, '\0', sizeof(pReq->u.In.szFilename)));
 #endif
@@ -3480,5 +3480,5 @@
     pImage->pvImageAlloc    = NULL;
     pImage->cbImageWithTabs = pReq->u.In.cbImageWithTabs;
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
     pImage->cbImageBits     = pReq->u.In.cbImageBits;
 #else
@@ -3500,5 +3500,5 @@
      * on the older method.
      */
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
     pImage->fNative         = true;
     rc = supdrvOSLdrOpen(pDevExt, pImage, pReq->u.In.szFilename);
@@ -3510,5 +3510,5 @@
         pImage->pvImageAlloc = RTMemExecAlloc(pImage->cbImageBits + 31);
         pImage->pvImage     = RT_ALIGN_P(pImage->pvImageAlloc, 32);
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
         pImage->fNative     = false;
 #endif
@@ -3568,5 +3568,5 @@
         }
 
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
         if (pImage->fNative)
         {
@@ -3620,5 +3620,5 @@
      * Validate input.
      */
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
     if (   pImage->cbImageWithTabs != pReq->u.In.cbImageWithTabs
         || pImage->cbImageBits     != pReq->u.In.cbImageBits)
@@ -3628,5 +3628,5 @@
     {
         RTSemFastMutexRelease(pDevExt->mtxLdr);
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
         Log(("SUP_IOCTL_LDR_LOAD: image size mismatch!! %d(prep) != %d(load) or %d != %d\n",
              pImage->cbImageWithTabs, pReq->u.In.cbImageWithTabs, pImage->cbImageBits, pReq->u.In.cbImageBits));
@@ -3728,5 +3728,5 @@
         pImage->pfnModuleTerm = pReq->u.In.pfnModuleTerm;
 
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
         if (pImage->fNative)
             rc = supdrvOSLdrLoad(pDevExt, pImage, pReq->u.In.achImage);
@@ -4224,5 +4224,5 @@
     }
 
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
     /* do native unload if appropriate. */
     if (pImage->fNative)
Index: /trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h	(revision 25259)
+++ /trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h	(revision 25260)
@@ -32,5 +32,5 @@
 #define ___SUPDrvIOC_h___
 
-/*#define SUPDRV_USE_NATIVE_LOADER*/
+/*#define VBOX_WITH_NATIVE_R0_LOADER*/
 
 /*
@@ -202,5 +202,5 @@
  *          next major version used on the trunk will be 0x00120000!
  */
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
 #define SUPDRV_IOC_VERSION                              0x00120000
 #else
@@ -300,5 +300,5 @@
             /** Size of the image we'll be loading (includeing tables). */
             uint32_t        cbImageWithTabs;
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
             /** The size of the image bits. (Less or equal to cbImageWithTabs.) */
             uint32_t        cbImageBits;
@@ -308,5 +308,5 @@
              * to share code with other processes. (Max len is 32 chars!)  */
             char            szName[32];
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
             /** Image file name.
              * This can be used to load the image using a native loader. */
@@ -421,5 +421,5 @@
             /** Entry point type. */
             SUPLDRLOADEP    eEPType;
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
             /** The size of the image bits (starting at offset 0 and
              * approaching offSymbols). */
Index: /trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h	(revision 25259)
+++ /trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h	(revision 25260)
@@ -428,5 +428,5 @@
     /** Usage count. */
     uint32_t volatile               cUsage;
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
     /** Whether it's loaded by the native loader or not. */
     bool                            fNative;
@@ -662,5 +662,5 @@
 int  VBOXCALL   supdrvOSEnableVTx(bool fEnabled);
 
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
 
 /**
@@ -713,5 +713,5 @@
 void VBOXCALL   supdrvOSLdrUnload(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage);
 
-#endif /* SUPDRV_USE_NATIVE_LOADER */
+#endif /* VBOX_WITH_NATIVE_R0_LOADER */
 
 /*******************************************************************************
Index: /trunk/src/VBox/HostDrivers/Support/SUPLib.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPLib.cpp	(revision 25259)
+++ /trunk/src/VBox/HostDrivers/Support/SUPLib.cpp	(revision 25260)
@@ -272,5 +272,5 @@
         strcpy(CookieReq.u.In.szMagic, SUPCOOKIE_MAGIC);
         CookieReq.u.In.u32ReqVersion = SUPDRV_IOC_VERSION;
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
         const uint32_t uMinVersion = (SUPDRV_IOC_VERSION & 0xffff0000) == 0x00120000
                                    ?  0x00120000
@@ -1659,5 +1659,5 @@
     AssertPtrReturn(ppvImageBase, VERR_INVALID_PARAMETER);
     AssertReturn(strlen(pszModule) < RT_SIZEOFMEMB(SUPLDROPEN, u.In.szName), VERR_FILENAME_TOO_LONG);
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
     char szAbsFilename[RT_SIZEOFMEMB(SUPLDROPEN, u.In.szFilename)];
     rc = RTPathAbs(pszFilename, szAbsFilename, sizeof(szAbsFilename));
@@ -1701,9 +1701,9 @@
         OpenReq.Hdr.rc = VERR_INTERNAL_ERROR;
         OpenReq.u.In.cbImageWithTabs = cbImageWithTabs;
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
         OpenReq.u.In.cbImageBits = (uint32_t)CalcArgs.cbImage;
 #endif
         strcpy(OpenReq.u.In.szName, pszModule);
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
         strcpy(OpenReq.u.In.szFilename, pszFilename);
 #endif
@@ -1816,5 +1816,5 @@
                             pLoadReq->u.In.cbStrTab                   = (uint32_t)CalcArgs.cbStrings;
                             AssertRelease(pLoadReq->u.In.cbStrTab == CalcArgs.cbStrings);
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
                             pLoadReq->u.In.cbImageBits                = (uint32_t)CalcArgs.cbImage;
 #endif
Index: /trunk/src/VBox/HostDrivers/Support/SUPLibInternal.h
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPLibInternal.h	(revision 25259)
+++ /trunk/src/VBox/HostDrivers/Support/SUPLibInternal.h	(revision 25260)
@@ -31,6 +31,4 @@
 #ifndef ___SUPLibInternal_h___
 #define ___SUPLibInternal_h___
-
-/*#define SUPDRV_USE_NATIVE_LOADER*/
 
 #include <VBox/cdefs.h>
Index: /trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp	(revision 25259)
+++ /trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp	(revision 25260)
@@ -759,5 +759,5 @@
 }
 
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
 
 int  VBOXCALL   supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename)
@@ -787,5 +787,5 @@
 }
 
-#endif /* SUPDRV_USE_NATIVE_LOADER */
+#endif /* VBOX_WITH_NATIVE_R0_LOADER */
 
 /**
Index: /trunk/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c	(revision 25259)
+++ /trunk/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c	(revision 25260)
@@ -600,5 +600,5 @@
 }
 
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
 
 int  VBOXCALL   supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename)
@@ -628,5 +628,5 @@
 }
 
-#endif /* SUPDRV_USE_NATIVE_LOADER */
+#endif /* VBOX_WITH_NATIVE_R0_LOADER */
 
 SUPR0DECL(int) SUPR0Printf(const char *pszFormat, ...)
Index: /trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c	(revision 25259)
+++ /trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c	(revision 25260)
@@ -1006,5 +1006,5 @@
 }
 
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
 
 int  VBOXCALL   supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename)
@@ -1034,5 +1034,5 @@
 }
 
-#endif /* SUPDRV_USE_NATIVE_LOADER */
+#endif /* VBOX_WITH_NATIVE_R0_LOADER */
 
 /**
Index: /trunk/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.cpp	(revision 25259)
+++ /trunk/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.cpp	(revision 25260)
@@ -382,5 +382,5 @@
 }
 
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
 
 int  VBOXCALL   supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename)
@@ -410,5 +410,5 @@
 }
 
-#endif /* SUPDRV_USE_NATIVE_LOADER */
+#endif /* VBOX_WITH_NATIVE_R0_LOADER */
 
 /**
Index: /trunk/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c	(revision 25259)
+++ /trunk/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c	(revision 25260)
@@ -897,5 +897,5 @@
 }
 
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
 
 int  VBOXCALL   supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename)
@@ -925,5 +925,5 @@
 }
 
-#endif /* SUPDRV_USE_NATIVE_LOADER */
+#endif /* VBOX_WITH_NATIVE_R0_LOADER */
 
 RTDECL(int) SUPR0Printf(const char *pszFormat, ...)
Index: /trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp	(revision 25259)
+++ /trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp	(revision 25260)
@@ -594,5 +594,5 @@
 }
 
-#ifdef SUPDRV_USE_NATIVE_LOADER
+#ifdef VBOX_WITH_NATIVE_R0_LOADER
 
 int  VBOXCALL   supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename)
@@ -622,5 +622,5 @@
 }
 
-#endif /* SUPDRV_USE_NATIVE_LOADER */
+#endif /* VBOX_WITH_NATIVE_R0_LOADER */
 
 /**
