SLAU131Y October 2004 – June 2021
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:
cl430 --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 9.11.)