The new shared library mechanism consists of a low level and an intermediate level. The low level is based on the System VR4 dlopen, dlsym and dlclose interface. This interface is emulated on systems where it is not natively supported. Function pointers retrieved by dlsym can either use a calling convention in which they take pointer arguments and return a pointer value, or they can use the calling convention of the internal XLISP functions. This level allows the original foreign function calling mechanism to be emulated.
The intermediate level adds a simple versioning system, a mechanism for initializing constants and associating internal functions with symbols. The internal functions are assumed to use the internal XLISP calling convention. A reflection mechanism for examining library contents is also provided. This combination provides rudimentary support for a shared module system.