SPRAB89A September 2011 – March 2014
Load modules may require execution of initialization code prior to being referenced or invoked, such as C++ constructors for static objects in the module. Similarly, termination code such as destructors may be required when the module terminates.
A module specifies any required initialization and termination using the DT_INIT, DT_INIT_ARRAY, DT_PREINIT_ARRAY, DT_FINI, and DT_FINI_ARRAY entries in the dynamic section, as specified by the System V ABI.
As with initialization, the loader and/or execution environment are responsible for executing the termination functions, according to the ordering constraints imposed by module dependencies.