Invoking the Linker
7-4
7.3
Invoking the Linker
The general syntax for invoking the linker is:
lnk500
[–options ] filename
1
. ... filename
n
lnk500
is the command that invokes the linker.
options
can appear anywhere on the command line or in a linker
command file. (Options are discussed in Section 7.4,
Linker
Options, on page 7-6.)
filenames
can be object files, linker command files, or archive libraries.
The default extension for all input files is
.obj ; any other exten-
sion 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 filename is
a.out.
There are three methods for invoking the linker:
-
Specify options and filenames on the command line. This example links
two files, file1.obj and file2.obj, and creates an output module named
link.out.
lnk500 file1.obj file2.obj –o link.out
-
Enter the lnk500 command with no filenames and no options; the linker
prompts for them:
Command files :
Object files [.obj] :
Output file [a.out] :
Options :
J
For
command files, enter one or more command filenames.
J
For
object files, enter one or more object filenames. The default exten-
sion is
.obj. Separate the filenames with spaces or commas; if the last
character is a comma, the linker prompts for an additional line of object
filenames.
J
The
output file is the name of the linker output module. This overrides
any – o options entered with any of the other prompts. If there are no
– o options and you do not answer this prompt, the linker creates an
object file with a default filename of
a.out.
J
The
options prompt is for additional options, although you can also
enter them in a command file. Enter them with hyphens, just as you
would on the command line.
Summary of Contents for TMS320C54x
Page 38: ......
Page 39: ......
Page 40: ......
Page 41: ......
Page 42: ......
Page 43: ......
Page 44: ......
Page 45: ......
Page 46: ......
Page 47: ......
Page 48: ......
Page 49: ......
Page 50: ......
Page 51: ......
Page 52: ......
Page 53: ......
Page 54: ......
Page 55: ......
Page 56: ......
Page 57: ......
Page 58: ......
Page 59: ......
Page 60: ......
Page 61: ......
Page 62: ......
Page 276: ......
Page 277: ......
Page 278: ......
Page 279: ......
Page 280: ......
Page 281: ......
Page 282: ......
Page 283: ......
Page 284: ......
Page 285: ......
Page 286: ......
Page 287: ......
Page 288: ......
Page 289: ......
Page 290: ......
Page 291: ......
Page 292: ......
Page 293: ......
Page 294: ......
Page 295: ......
Page 296: ......
Page 297: ......
Page 298: ......
Page 299: ......
Page 300: ......
Page 301: ......
Page 302: ......