VirtualBox

Changeset 58618 in vbox


Ignore:
Timestamp:
Nov 9, 2015 2:25:58 PM (9 years ago)
Author:
vboxsync
Message:

bugref:8087: Additions/x11: support non-root X server: make the VBoxOGL.so replacement OpenGL library executable. Executing it returns 0 if the system it is running on supports VirtualBox OpenGL pass-through in its current configuration and 1 otherwise. The intended use is knowing at guest boot time whether or not to put the library in place.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/load.c

    r58614 r58618  
    11261126/* Sigh -- we can't do initialization at load time, since Windows forbids
    11271127 * the loading of other libraries from DLLMain. */
     1128
     1129/** @note On Linux we make our shared library executable as a quick way of
     1130 * testing whether a particular guest supports 3D in the current configuration.
     1131 * If 3D is not enabled, the constructor will exit with status 1.  If the
     1132 * library cannot be loaded at all (e.g. missing dependencies) executing it will
     1133 * also fail. */
     1134#ifdef RT_OS_LINUX
     1135# ifdef RT_ARCH_AMD64
     1136const char pszInterpreter[] __attribute__((section(".interp"))) = "/lib64/ld-linux-x86-64.so.2";
     1137# else
     1138const char pszInterpreter[] __attribute__((section(".interp"))) = "/lib/ld-linux.so.2";
     1139# endif
     1140
     1141extern void LibMain()
     1142{
     1143   if (!stubInit())
     1144       _exit(1);
     1145   _exit(0);
     1146}
     1147#endif
    11281148
    11291149#ifdef WINDOWS
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette