Package org.lwjgl.system.linux
Class DynamicLinkLoader
- java.lang.Object
-
- org.lwjgl.system.linux.DynamicLinkLoader
-
public class DynamicLinkLoader extends java.lang.ObjectNative bindings to.
-
-
Field Summary
Fields Modifier and Type Field and Description static intRTLD_BINDING_MASK
RTLD_DEEPBINDThemodeargument toDynamicLinkLoader.dlopen(java.nio.ByteBuffer, int)contains one of the following.static intRTLD_GLOBALIf the following bit is set in themodeargument toDynamicLinkLoader.dlopen(java.nio.ByteBuffer, int), the symbols of the loaded object and its dependencies are made visible as if the object were linked directly into the program.static intRTLD_LAZYThemodeargument toDynamicLinkLoader.dlopen(java.nio.ByteBuffer, int)contains one of the following.static intRTLD_LOCALUnix98 demands the following flag which is the inverse toDynamicLinkLoader.RTLD_GLOBAL.static intRTLD_NODELETEDo not delete object when closed.static intRTLD_NOLOAD
RTLD_NOWThemodeargument toDynamicLinkLoader.dlopen(java.nio.ByteBuffer, int)contains one of the following.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static intdlclose(long handle)Decrements the reference count on the dynamic library handle handle.static java.lang.Stringdlerror()Returns a human readable string describing the most recent error that occurred fromDynamicLinkLoader.dlopen(java.nio.ByteBuffer, int),DynamicLinkLoader.dlsym(long, java.nio.ByteBuffer)orDynamicLinkLoader.dlclose(long)since the last call todlerror().static longdlopen(java.nio.ByteBuffer filename, int mode)Loads the dynamic library file named by the null-terminated stringfilenameand returns an opaque "handle" for the dynamic library.static longdlopen(java.lang.CharSequence filename, int mode)Loads the dynamic library file named by the null-terminated stringfilenameand returns an opaque "handle" for the dynamic library.static longdlsym(long handle, java.nio.ByteBuffer name)Takes a "handle" of a dynamic library returned byDynamicLinkLoader.dlopen(java.nio.ByteBuffer, int)and the null-terminated symbol name, returning the address where that symbol is loaded into memory.static longdlsym(long handle, java.lang.CharSequence name)Takes a "handle" of a dynamic library returned byDynamicLinkLoader.dlopen(java.nio.ByteBuffer, int)and the null-terminated symbol name, returning the address where that symbol is loaded into memory.
-
-
-
Field Detail
-
RTLD_LAZY
public static final int RTLD_LAZY
Themodeargument toDynamicLinkLoader.dlopen(java.nio.ByteBuffer, int)contains one of the following.- See Also:
- Constant Field Values
-
RTLD_NOW
public static final int RTLD_NOW
Themodeargument toDynamicLinkLoader.dlopen(java.nio.ByteBuffer, int)contains one of the following.- See Also:
- Constant Field Values
-
RTLD_BINDING_MASK
public static final int RTLD_BINDING_MASK
Themodeargument toDynamicLinkLoader.dlopen(java.nio.ByteBuffer, int)contains one of the following.- See Also:
- Constant Field Values
-
RTLD_NOLOAD
public static final int RTLD_NOLOAD
Themodeargument toDynamicLinkLoader.dlopen(java.nio.ByteBuffer, int)contains one of the following.- See Also:
- Constant Field Values
-
RTLD_DEEPBIND
public static final int RTLD_DEEPBIND
Themodeargument toDynamicLinkLoader.dlopen(java.nio.ByteBuffer, int)contains one of the following.- See Also:
- Constant Field Values
-
RTLD_GLOBAL
public static final int RTLD_GLOBAL
If the following bit is set in themodeargument toDynamicLinkLoader.dlopen(java.nio.ByteBuffer, int), the symbols of the loaded object and its dependencies are made visible as if the object were linked directly into the program.- See Also:
- Constant Field Values
-
RTLD_LOCAL
public static final int RTLD_LOCAL
Unix98 demands the following flag which is the inverse toDynamicLinkLoader.RTLD_GLOBAL. The implementation does this by default and so we can define the value to zero.- See Also:
- Constant Field Values
-
RTLD_NODELETE
public static final int RTLD_NODELETE
Do not delete object when closed.- See Also:
- Constant Field Values
-
-
Method Detail
-
dlopen
public static long dlopen(java.nio.ByteBuffer filename, int mode)Loads the dynamic library file named by the null-terminated stringfilenameand returns an opaque "handle" for the dynamic library. IffilenameisNULL, then the returned handle is for the main program.- Parameters:
filename- the name of the dynamic library to open, orNULLmode- a bitfield. One or more of:
-
dlopen
public static long dlopen(java.lang.CharSequence filename, int mode)Loads the dynamic library file named by the null-terminated stringfilenameand returns an opaque "handle" for the dynamic library. IffilenameisNULL, then the returned handle is for the main program.- Parameters:
filename- the name of the dynamic library to open, orNULLmode- a bitfield. One or more of:
-
dlerror
public static java.lang.String dlerror()
Returns a human readable string describing the most recent error that occurred fromDynamicLinkLoader.dlopen(java.nio.ByteBuffer, int),DynamicLinkLoader.dlsym(long, java.nio.ByteBuffer)orDynamicLinkLoader.dlclose(long)since the last call todlerror(). It returnsNULLif no errors have occurred since initialization or since it was last called.
-
dlsym
public static long dlsym(long handle, java.nio.ByteBuffer name)Takes a "handle" of a dynamic library returned byDynamicLinkLoader.dlopen(java.nio.ByteBuffer, int)and the null-terminated symbol name, returning the address where that symbol is loaded into memory. If the symbol is not found, in the specified library or any of the libraries that were automatically loaded byDynamicLinkLoader.dlopen(java.nio.ByteBuffer, int)when that library was loaded,dlsym()returnsNULL.- Parameters:
handle- the dynamic library handlename- the symbol name
-
dlsym
public static long dlsym(long handle, java.lang.CharSequence name)Takes a "handle" of a dynamic library returned byDynamicLinkLoader.dlopen(java.nio.ByteBuffer, int)and the null-terminated symbol name, returning the address where that symbol is loaded into memory. If the symbol is not found, in the specified library or any of the libraries that were automatically loaded byDynamicLinkLoader.dlopen(java.nio.ByteBuffer, int)when that library was loaded,dlsym()returnsNULL.- Parameters:
handle- the dynamic library handlename- the symbol name
-
dlclose
public static int dlclose(long handle)
Decrements the reference count on the dynamic library handle handle. If the reference count drops to zero and no other loaded libraries use symbols in it, then the dynamic library is unloaded.- Parameters:
handle- the dynamic library to close
-
-