Texas Instruments TMS320C54x User Manual page 221

Digital signal processors
Hide thumbs Also See for TMS320C54x:
Table of Contents

Advertisement

-
Producing a Relocatable Output Module (– r Option)
When you use the –r option without the –a option, the linker retains
relocation entries in the output module. If the output module will be
relocated (at load time) or relinked (by another linker execution), use –r to
retain the relocation entries.
The linker produces a file that is not executable when you use the –r option
without –a. A file that is not executable does not contain special linker
symbols or an optional header. The file may contain unresolved refer-
ences, but these references do not prevent creation of an output module.
The following example links file1.obj and file2.obj and creates a relocat-
able output module called a.out:
lnk500 –r file1.obj file2.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 7.18, Linker Example , on page
7-71.
-
Producing an Executable Relocatable Output Module (–ar)
If you invoke the linker with both the –a and –r options, the linker produces
an executable, relocatable object module. The output file contains the
special linker symbols, an optional header, and all resolved symbol
references; however, the relocation information is retained.
The following example links file1.obj and file2.obj and creates an
executable, relocatable output module called xr.out:
lnk500 –ar file1.obj file2.obj –o xr.out
You can string the options together (lnk500 –ar) or enter them separately
(lnk500 –a –r).
-
Relocating or Relinking an Absolute Output Module
The linker issues a warning message (but continues executing) when it
encounters a file that contains no relocation or symbol table information.
Relinking an absolute file can be successful only if each input file contains
no information that needs to be relocated (that is, each file has no
unresolved references and is bound to the same virtual address that it was
bound to when the linker created it).
Linker Options
Linker Description
7-9

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C54x and is the answer not in the manual?

Table of Contents