As far as the application programmer is concerned, the loading is largely transparent, since it is mostly handled by the operating system (or its I/O subsystem).
Unix-like operating systems such as macOS, Linux, and Solaris provide dynamic loading with the C programming language "dl" library.
depending on the OS) Loading the library is accomplished with LoadLibrary or LoadLibraryEx on Windows and with dlopen on Unix-like operating systems.
Examples follow: As a Unix library: As a macOS Framework: Or if the framework or bundle contains Objective-C code: Extracting the contents of a dynamically loaded library is achieved with GetProcAddress on Windows and with dlsym on Unix-like operating systems.
This makes use of the fact that reading from a different union member than the one most recently written to (called "type punning") is common, and explicitly allowed even if strict aliasing is in force, provided the memory is accessed through the union type directly.
[8] For the subsequent version of the standard (issue 7, 2008), the problem has been discussed and the conclusion was that function pointers have to be convertible to void* for POSIX compliance.
Unloading the library is accomplished with FreeLibrary on Windows and with dlclose on Unix-like operating systems.
The implementations of dynamic loading on Unix-like operating systems and Windows allow programmers to extract symbols from the currently executing process.
Unix-like operating systems allow programmers to access the global symbol table, which includes both the main executable and subsequently loaded dynamic libraries.
Implicit unloading of classes, i.e. in an uncontrolled way by the garbage collector, has changed a few times in Java.
For example, Plan 9 from Bell Labs and its successor 9front intentionally avoid dynamic linking, as they consider it to be "harmful".
[9] The Go programming language, by some of the same developers as Plan 9, also did not support dynamic linking, but plugin loading is available since Go 1.8 (February 2017).