Index: /trunk/src/VBox/Additions/x11/xgraphics/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Additions/x11/xgraphics/Makefile.kmk	(revision 6552)
+++ /trunk/src/VBox/Additions/x11/xgraphics/Makefile.kmk	(revision 6553)
@@ -29,5 +29,4 @@
 VBOX_LIB_VBGL_R3 := $(PATH_LIB)/VBoxGuestR3LibLinux.a
 VBOX_LIB_VBGL_R3_XFREE86 := $(PATH_LIB)/VBoxGuestR3LibLinuxXFree86.a
-VBOX_LIB_IPRT_GUEST_R3 := $(PATH_LIB)/RuntimeLnx32GuestR3Shared.a
 
 vboxvideo_drv_TEMPLATE = VBOXLNX32GUESTR3EXE
@@ -127,5 +126,5 @@
 vboxvideo_drv_70_LIBS = \
 	$(VBOX_LIB_VBGL_R3) \
-	$(VBOX_LIB_IPRT_GUEST_R3) \
+	$(VBOX_LIB_IPRT_GUEST_MINI_R3) \
 	$(VBOX_LIB_VBGL_R3)
 
@@ -143,5 +142,5 @@
 vboxvideo_drv_71_LIBS = \
 	$(VBOX_LIB_VBGL_R3) \
-	$(VBOX_LIB_IPRT_GUEST_R3) \
+	$(VBOX_LIB_IPRT_GUEST_MINI_R3) \
 	$(VBOX_LIB_VBGL_R3)
 
@@ -159,5 +158,5 @@
 vboxvideo_drv_13_LIBS = \
 	$(VBOX_LIB_VBGL_R3) \
-	$(VBOX_LIB_IPRT_GUEST_R3) \
+	$(VBOX_LIB_IPRT_GUEST_MINI_R3) \
 	$(VBOX_LIB_VBGL_R3)
 
@@ -177,5 +176,5 @@
 vboxvideo_drv_14_LIBS = \
 	$(VBOX_LIB_VBGL_R3) \
-	$(VBOX_LIB_IPRT_GUEST_R3) \
+	$(VBOX_LIB_IPRT_GUEST_MINI_R3) \
 	$(VBOX_LIB_VBGL_R3)
 endif
@@ -199,4 +198,5 @@
 	$(VBOX_LIB_IPRT_GUEST_R3) \
 	$(VBOX_LIB_VBGL_R3)
+## @todo Use VBOX_LIB_IPRT_GUEST_MINI_R3 instead of VBOX_LIB_IPRT_GUEST_R3?
 endif
 
Index: /trunk/src/VBox/Runtime/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Runtime/Makefile.kmk	(revision 6552)
+++ /trunk/src/VBox/Runtime/Makefile.kmk	(revision 6553)
@@ -34,5 +34,5 @@
  #
  ifeq ($(BUILD_TARGET),linux)
-  LIBRARIES  = RuntimeLnx32GuestR0 RuntimeLnx32GuestR3 RuntimeLnx32GuestR3Shared
+  LIBRARIES  = RuntimeLnx32GuestR0 RuntimeLnx32GuestR3 RuntimeGuestR3Mini
  else ifeq ($(BUILD_TARGET),os2)
   LIBRARIES  = RuntimeOS2GuestR0 RuntimeOS2GuestR3 #RuntimeOS2Warp3GuestR0
@@ -40,5 +40,5 @@
   LIBRARIES = RuntimeW32GuestR0 RuntimeW32GuestR3 RuntimeW32NT4GuestR0
  else
-  LIBRARIES = RuntimeGuestR0 RuntimeGuestR3 RuntimeGuestR3Shared
+  LIBRARIES = RuntimeGuestR0 RuntimeGuestR3 RuntimeGuestR3Mini
   #LIBRARIES.os2 = RuntimeOS2Warp3GuestR0
   #LIBRARIES.win = RuntimeW32NT4GuestR0
@@ -49,5 +49,5 @@
  #
 else ifdef VBOX_ADDITIONS_LINUX_ONLY
- LIBRARIES  = RuntimeLnx32GuestR0 RuntimeLnx32GuestR3 RuntimeLnx32GuestR3Shared
+ LIBRARIES  = RuntimeLnx32GuestR0 RuntimeLnx32GuestR3 RuntimeGuestR3Mini
 else ifdef VBOX_ADDITIONS_WIN32_ONLY
  LIBRARIES = RuntimeW32GuestR0 RuntimeW32GuestR3 RuntimeW32NT4GuestR0
@@ -68,5 +68,5 @@
    endif
    ifdef VBOX_WITH_LINUX_ADDITIONS
-    LIBRARIES += RuntimeLnx32GuestR3 RuntimeLnx32GuestR3Shared
+    LIBRARIES += RuntimeLnx32GuestR3 RuntimeGuestR3Mini
     ifdef VBOX_WITH_LINUX_ADDITIONS_32BIT_R0
      LIBRARIES += RuntimeLnx32GuestR0
@@ -78,5 +78,5 @@
    endif
   else
-   LIBRARIES += RuntimeGuestR0 RuntimeGuestR3 RuntimeGuestR3Shared
+   LIBRARIES += RuntimeGuestR0 RuntimeGuestR3 RuntimeGuestR3Mini
   endif
   #LIBRARIES.os2 = RuntimeOS2Warp3GuestR0
@@ -456,40 +456,4 @@
 ## PORTME: Porters add their selection of platform specific files for Ring-3 here.
 
-RuntimeR3Shared_SOURCES       = \
-	common/err/errmsg.cpp \
-	common/err/RTErrConvertFromErrno.cpp \
-	common/log/logformat.cpp \
-	common/misc/assert.cpp \
-	common/misc/sanity-c.c \
-	common/misc/sanity-cpp.cpp \
-	common/string/strformat.cpp \
-	common/string/strformatrt.cpp \
-	common/string/string.cpp \
-	common/string/strprintf.cpp \
-	common/string/unidata.cpp \
-	common/string/utf-8.cpp \
-	common/string/utf-16.cpp \
-	generic/pathhost-generic.cpp \
-	generic/RTAssertDoBreakpoint-generic.cpp \
-	r3/alloc.cpp \
-	r3/fileio.cpp \
-	r3/fs.cpp \
-	r3/path.cpp
-
-# VBox specific stuff.
-RuntimeR3Shared_SOURCES += \
-	VBox/strformat-vbox.cpp
-
-RuntimeR3Shared_SOURCES.linux = \
-	r3/posix/fileio-posix.cpp \
-	r3/posix/path-posix.cpp \
-	r3/posix/utf8-posix.cpp
-
-
-RuntimeR3Shared_SOURCES.solaris = \
-	r3/posix/fileio-posix.cpp \
-	r3/posix/path-posix.cpp \
-	r3/posix/utf8-posix.cpp
-
 
 #
@@ -559,21 +523,52 @@
 
 #
-# RuntimeGuestR3Shared - Guest Additions Runtime (static) which does not require initialisation.
-#
-RuntimeGuestR3Shared_TEMPLATE             := VBOXGUESTR3LIB
-RuntimeGuestR3Shared_SDKS.win             := $(RuntimeR3_SDKS.win)
-RuntimeGuestR3Shared_DEFS                 := $(filter-out RTCRITSECT_STRICT, $(RuntimeR3_DEFS)) \
-                                             VBOX_SHARED_RUNTIME
-RuntimeGuestR3Shared_DEFS.$(BUILD_TARGET) := $(RuntimeR3_DEFS.$(BUILD_TARGET))
-RuntimeGuestR3Shared_INCS                 := $(RuntimeR3_INCS)
-RuntimeGuestR3Shared_INCS.$(BUILD_TARGET) := $(RuntimeR3_INCS.$(BUILD_TARGET))
-RuntimeGuestR3Shared_SOURCES              := $(filter-out \
-	generic/RTLogWriteUser-generic.cpp \
-	, $(RuntimeR3Shared_SOURCES))
-RuntimeGuestR3Shared_SOURCES              += \
+# RuntimeGuestR3Mini - Minimal Guest Additions Runtime which does not require 
+#                      initialization and can be linked into an .so. Intended 
+#                      for X11 drivers.
+#
+ifeq ($(BUILD_TARGET),linux) ## @todo elimiate this by fixing VBOXGUESTR3LIB/DLL/EXE. What about NOCPP like the x11 bits?
+RuntimeGuestR3Mini_TEMPLATE             := VBOXLNX32GUESTR3LIB
+else ## @todo this should be VBOXGUESTR3DLL I think if PIC code is required.
+RuntimeGuestR3Mini_TEMPLATE             := VBOXGUESTR3LIB
+endif
+RuntimeGuestR3Mini_SDKS.win             := $(RuntimeR3_SDKS.win)
+RuntimeGuestR3Mini_DEFS                 := $(filter-out RTCRITSECT_STRICT, $(RuntimeR3_DEFS)) \
+                                           RT_MINI
+RuntimeGuestR3Mini_DEFS.$(BUILD_TARGET) := $(RuntimeR3_DEFS.$(BUILD_TARGET))
+RuntimeGuestR3Mini_INCS                 := $(RuntimeR3_INCS)
+RuntimeGuestR3Mini_INCS.$(BUILD_TARGET) := $(RuntimeR3_INCS.$(BUILD_TARGET))
+RuntimeGuestR3Mini_SOURCES               = \
+	common/err/errmsg.cpp \
+	common/err/RTErrConvertFromErrno.cpp \
+	common/log/logformat.cpp \
+	common/misc/assert.cpp \
+	common/misc/sanity-c.c \
+	common/misc/sanity-cpp.cpp \
+	common/string/strformat.cpp \
+	common/string/strformatrt.cpp \
+	common/string/string.cpp \
+	common/string/strprintf.cpp \
+	common/string/unidata.cpp \
+	common/string/utf-8.cpp \
+	common/string/utf-16.cpp \
+	generic/pathhost-generic.cpp \
+	generic/RTAssertDoBreakpoint-generic.cpp \
+	r3/alloc.cpp \
+	r3/fileio.cpp \
+	r3/fs.cpp \
+	r3/path.cpp
+RuntimeGuestR3Mini_SOURCES.linux         = \
+	r3/posix/fileio-posix.cpp \
+	r3/posix/path-posix.cpp \
+	r3/posix/utf8-posix.cpp
+RuntimeGuestR3Mini_SOURCES.solaris       = \
+	r3/posix/fileio-posix.cpp \
+	r3/posix/path-posix.cpp \
+	r3/posix/utf8-posix.cpp
+# VBox specific stuff.
+RuntimeGuestR3Mini_SOURCES              += \
 	VBox/logbackdoor.cpp \
-	VBox/logbackdoor-redirect.cpp
-RuntimeGuestR3Shared_SOURCES.$(BUILD_TARGET) := $(RuntimeR3Shared_SOURCES.$(BUILD_TARGET))
-RuntimeGuestR3Shared_SOURCES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH) := $(RuntimeR3Shared_SOURCES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))
+	VBox/logbackdoor-redirect.cpp \
+	VBox/strformat-vbox.cpp
 
 
@@ -602,21 +597,4 @@
 RuntimeLnx32GuestR3_SOURCES   += VBox/logbackdoor.cpp
 RuntimeLnx32GuestR3_INCS       = $(RuntimeR3_INCS.linux)    $(RuntimeR3_INCS)
-
-
-#
-# RuntimeLnx32GuestR3Shared - 32-bit Linux guest program runtime which does not require
-# initialisation.
-#
-RuntimeLnx32GuestR3Shared_TEMPLATE   = VBOXLNX32GUESTR3LIB
-RuntimeLnx32GuestR3Shared_DEFS       = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF32 \
-                                       LDR_WITH_PE RT_WITH_VBOX VBOX_SHARED_RUNTIME
-ifdef IPRT_WITH_KSTUFF
- RuntimeLnx32GuestR3Shared_DEFS     += LDR_WITH_KLDR
-endif
-RuntimeLnx32GuestR3Shared_SOURCES    = $(RuntimeR3Shared_SOURCES.linux) $(RuntimeR3Shared_SOURCES)
-RuntimeLnx32GuestR3Shared_SOURCES   += \
-        VBox/logbackdoor.cpp \
-        VBox/logbackdoor-redirect.cpp
-RuntimeLnx32GuestR3Shared_INCS       = $(RuntimeR3_INCS.linux)    $(RuntimeR3_INCS)
 
 
Index: /trunk/src/VBox/Runtime/VBox/strformat-vbox.cpp
===================================================================
--- /trunk/src/VBox/Runtime/VBox/strformat-vbox.cpp	(revision 6552)
+++ /trunk/src/VBox/Runtime/VBox/strformat-vbox.cpp	(revision 6553)
@@ -139,9 +139,9 @@
              */
             case 't':
-#if defined(IN_RING3) && !defined(VBOX_SHARED_RUNTIME)  /* we don't want this anywhere else yet. */
+#if defined(IN_RING3) && !defined(RT_MINI)  /* we don't want this anywhere else yet. */
                 return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "%#x\n", RTThreadSelf());
-#else /* !IN_RING3 */
+#else /* !IN_RING3 || RT_MINI */
                 return pfnOutput(pvArgOutput, "0xffffffff", sizeof("0xffffffff") - 1);
-#endif /* !IN_RING3 */
+#endif /* !IN_RING3 || RT_MINI */
 
             case 'h':
Index: /trunk/src/VBox/Runtime/r3/path.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/path.cpp	(revision 6552)
+++ /trunk/src/VBox/Runtime/r3/path.cpp	(revision 6553)
@@ -553,5 +553,6 @@
 }
 
-#ifndef VBOX_SHARED_RUNTIME
+
+#ifndef RT_MINI
 
 /**
@@ -687,3 +688,4 @@
 }
 
-#endif /* !VBOX_SHARED_RUNTIME */
+#endif /* !RT_MINI */
+
Index: /trunk/src/VBox/Runtime/r3/posix/path-posix.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/posix/path-posix.cpp	(revision 6552)
+++ /trunk/src/VBox/Runtime/r3/posix/path-posix.cpp	(revision 6553)
@@ -401,6 +401,5 @@
 
 
-#ifndef VBOX_SHARED_RUNTIME
-
+#ifndef RT_MINI
 RTDECL(int) RTPathProgram(char *pszPath, unsigned cchPath)
 {
@@ -488,6 +487,6 @@
     return VERR_BUFFER_OVERFLOW;
 }
-
-#endif /* !VBOX_SHARED_RUNTIME */
+#endif /* !RT_MINI */
+
 
 #ifndef RT_OS_L4
