Linker Command Files
7-22
Example
7–1 shows a sample linker command file called link.cmd.
(Subsection 2.4.2,
Placing Sections in the Memory Map, on page 2-14 con-
tains another example of a linker command file.)
Example 7–1. Linker Command File
a.obj /* First input filename */
b.obj /* Second input filename */
–o prog.out /* Option to specify output file */
–m prog.map /* Option to specify map file */
The sample file in Example 7–1 contains only filenames and options. You can
place comments in a command file by delimiting them with /* and */. To invoke
the linker with this command file, enter:
lnk500
link.cmd
You can place other parameters on the command line when you use a
command file:
lnk500
–r link.cmd c.obj d.obj
The linker processes the command file as soon as it encounters it, so a.obj and
b.obj are linked into the output module before c.obj and d.obj.
You can specify multiple command files. If, for example, you have a file called
names.lst that contains filenames and another file called dir.cmd that contains
linker directives, you could enter:
lnk500
names.lst dir.cmd
One command file can call another command file; this type of nesting is limited
to 16 levels. If a command file calls another command file as input, this
statement must be the
last statement in the calling command file.
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: ......