
Invoking the Linker as an Individual Program
4-2
4.1 Invoking the Linker as an Individual Program
This section shows how to invoke the linker in a separate step after you have
compiled and assembled your programs. This is the general syntax for linking
C programs in a separate step:
dsplnk
{
−
c
|
−
cr
}
filenames
[
-options
] [
−
o
name.out
]
−
l
libraryname
[
lnk.cmd
]
lnk6x
is the command that invokes the linker.
−
c
|
−
cr
are options that tell the linker to use special conventions
defined by the C environment. When you use dsplnk, you
must use
−
c or
−
cr. The
−
c option uses automatic variable
initialization at runtime; the
−
cr option uses variable initiali-
zation at load time.
filenames
are names of object files, linker command files, or archive
libraries. The default extension for all input files is .
obj
; any
other extension must be explicitly specified. The linker can
determine whether the input file is an object or ASCII file
that contains linker commands. The default output file-
name is
a.out
, unless you use the
−
o option to name the
output file.
options
affect how the linker handles your object files. Options can
appear anywhere on the command line or in a linker com-
mand file. (Options are discussed in section 4.4)
−
o
name.out
The
−
o option names the output file.
−
l
libraryname
(lowercase L) Identifies the appropriate archive library
containing C run-time-support and floating-point math
functions. (The
−
l option tells the linker that a file is an ar-
chive library.) If you are linking C code, you must use a run-
time-support library. You can use the libraries included
with the compiler, or you can create your own run-time-
support library. If you have specified a run-time-support
library in a linker command file, you do not need this
parameter.
lnk.cmd
contains options, filenames, directives, or commands for
the linker.
Table 4
−
1. Run-Time-Support Source Libraries
Library Name
Library Source Contents
rts25.lib
TMS320C2x runtime support
rts2xx.lib
TMS320C2xx runtime support
rts50.lib
TMS320C5x runtime support
Содержание TMS320C2x
Страница 8: ...viii...
Страница 69: ...2 47 C Compiler Description...
Страница 159: ...6 36...
Страница 226: ...8 6...
Страница 250: ...Index Index 14 Z z shell option 2 2 2 4 2 14 overriding with c option 4 5 overriding with n option 2 13...