Dynamic linking has not been ported to all platforms. Operating systems
in the BSD family (a.out binary format) can usually be ported to
DLD. The dl library (
#define SUN_DL for SCM) was a
proposed POSIX standard and may be available on other machines with
COFF binary format. For notes about porting to MS-Windows and
finishing the port to VMS VMS Dynamic Linking.
DLD is a library package of C functions that performs dynamic link editing on GNU/Linux, VAX (Ultrix), Sun 3 (SunOS 3.4 and 4.0), SPARCstation (SunOS 4.0), Sequent Symmetry (Dynix), and Atari ST. It is available from:
These notes about using libdl on SunOS are from gcc.info:
On a Sun, linking using GNU CC fails to find a shared library and reports that the library doesn’t exist at all.
This happens if you are using the GNU linker, because it does only static linking and looks only for unshared libraries. If you have a shared library with no unshared counterpart, the GNU linker won’t find anything.
We hope to make a linker which supports Sun shared libraries, but please don’t ask when it will be finished–we don’t know.
Sun forgot to include a static version of libdl.a with some versions of SunOS (mainly 4.1). This results in undefined symbols when linking static binaries (that is, if you use ‘-static’). If you see undefined symbols ‘_dlclose’, ‘_dlsym’ or ‘_dlopen’ when linking, compile and link against the file mit/util/misc/dlsym.c from the MIT version of X windows.