SPRU513Z August 2001 – October 2023 SM320F28335-EP
When you use the --relocatable option, the linker retains relocation entries in the output module. If the output module is relocated (at load time) or relinked (by another linker execution), use --relocatable to retain the relocation entries.
The linker produces a file that is not executable when you use the --relocatable option without the --absolute_exe option. A file that is not executable does not contain special linker symbols or an optional header. The file can contain unresolved references, but these references do not prevent creation of an output module.
This example links file1.c.obj and file2.c.obj and creates a relocatable output module called a.out:
cl2000 --run_linker --relocatable file1.c.obj file2.c.obj
The output file a.out can be relinked with other object files or relocated at load time. (Linking a file that will be relinked with other files is called partial linking. For more information, see Section 8.10.)