The ld linker links object files (the intermediate files that gcc generates) to system library files to produce executable files. Because most programs that Linux runs are usually based on shared code, incompatibilities sometimes occur when moving programs between different releases or distributions of Linux.
The ld linker knows about the standard libraries on your system and attempts to link these with the object files of the program. For example, if you have an object file called greeting.o that you have compiled with gcc, you would use the following command to produce an executable file with the same name:
ld -o greeting greeting.o
The ld linker would take the standard library files and dynamically link ...