DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
ELF object files

Dynamic linker

When building an executable file that uses dynamic linking, the link editor adds a program header element of type PT_INTERP to an executable file, telling the system to invoke the dynamic linker as the program interpreter. exec() and the dynamic linker cooperate to create the process image for the program, which entails the following actions:


NOTE: The location(s) of the system provided dynamic linker(s) are processor specific.

The link editor also constructs various data that assist the dynamic linker for executable and shared object files. As shown previously in ``Program header'', this data resides in loadable segments, making them available during execution. As explained in ``Program loading (processor-specific)'', shared objects may occupy virtual memory addresses that are different from the addresses recorded in the file's program header table. The dynamic linker relocates the memory image, updating absolute addresses before the application gains control. Although the absolute address values would be correct if the library were loaded at the addresses specified in the program header table, this normally is not the case.

If the process environment contains a variable named with a non-null value the dynamic linker processes all relocations before transferring control to the program.


NOTE: See ``Checking for run-time compatibility'' for more information.

For example, all the following environment entries would specify this behavior.

Otherwise, LD_BIND_NOW either does not occur in the environment or has a null value. The dynamic linker is permitted to evaluate procedure linkage table entries slowly, thus avoiding symbol resolution and relocation overhead for functions that are not called.
Next topic: Dynamic section
Previous topic: Program interpreter

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003