The following general information is culled from dso(5), ld(1), rld(1). For much more detail and specifics it is essential to become well-versed with all of these as well as elf(5), elfdump(1), and dlopen(3). Tasks performed by the dynamic linker (RLD) ------------------------------------------- Basic (QUICKSTART): * Maps shared objects in, as specified in the liblist. (Objects marked with the delay-load flag would not be loaded until a symbol cannot be resolved without it.) default path: /usr/lib:/lib Can override default path by: * rpath (set in main executable) * LD_LIBRARY_PATH (environment variable) * Resolves all unresolved DATA symbols (GOT value == 0) * Resolves all conflicting symbols as appeared in the conflict list * Fixes up relocations for the above symbols * Executes all .init sections How RLD determines QUICKSTART ----------------------------- In gerenal, RLD assumes QUICKSTART unless: * the executable or shared object does not have the RHF_QUICKSTART bit set (determined by the static linker) * the timestamp or checksum value of a shared object does not match that as specified in the liblist * RHF_GUARANTEE_INIT or RHF_GUARANTEE_START_INIT bit is set (set during static link-time or by pixie) * a shared object is MOVED from its QUICKSTART location Tasks performed by RLD for non-QUICKSTART (in addition to basic operations) --------------------------------------------------------------------------- * If only TIMESTAMP is changed: -- Resolves all UNDEF symbols, both TEXT and DATA (TEXT is a lot less work because of lazy text resolution) -- Resolves all conflicting symbols -- Resolves relocations for the above symbols -- Allocate memory space for COMMON symbols if necessary * If only CHECKSUM is changed: -- Resolves all external symbols, both defined and undefined -- Resolves relocations from above. -- Allocate COMMON * If a shared object is MOVED: -- Adjusts all addresses for the MOVED object including locals and externals -- Resolves all UNDEF symbols, both TEXT and DATA -- Resolves conflicts -- Resolves relocations -- Allocates COMMON Environment variables for RLD ----------------------------- * _RLD_PATH -- setting the pathname of rld to be used. Default is /lib/rld. e.g. setenv _RLD_PATH /usr/tmp/rld To enable printing of informational msgs, must use rld.debug (usually resides under /usr/lib) e.g. setenv _RLD_PATH /usr/lib/rld.debug * _RLD_ARGS -- getting informational msgs from RLD -quickstart_info tells you whether QUICKSTART has failed. e.g. 3088:env: [rld] Quickstart failed for object /usr/lib/libc.so.1: TIMESTAMP CHANGED from that expected by env -time_summary Runtime summary e.g. 3100:env: Summary of timing: 3100:env: In rld: 3100:env: 0.000000 s user time 3100:env: 0.010000 s system time 3100:env: 0.150000 s clock time 3100:env: In shared object initialization code: 3100:env: 0.000000 s user time 3100:env: 0.000000 s system time 3100:env: 0.000000 s clock time 3100:env: In user program: 3100:env: 0.000000 s user time 3100:env: 0.010000 s system time 3100:env: 0.010000 s clock time Requickstart tools ------------------ * Requickstart -- performs similar operations like RLD, just more restrictive, and recreates new shared obj and executable file. * RecordObjects -- Used during installation. Save info of name, timestamp, checksum and rpath for each shared obj. * RequickstartAll -- Reads info created by RecordObjects and call Requickstart appropiately.