|
|
If a file produced by ld is intended to be used in a subsequent ld run, the first ld run should have the -r option set. This preserves relocation information and permits the sections of the file to be relocated by the subsequent run.
If an ld input file does not have relocation or symbol table information (perhaps from the action of a strip(CP) command, or from being link edited without a -r option, or with a -s option), the link edit run continues using the nonrelocatable input file.
For such a link edit to be successful (that is, to correctly link all input files, relocate all symbols, resolve unresolved references, and so on), two conditions on the nonrelocatable input files must be met: