User`s guide
ELF Linker and Command Language
Linker Command File Syntax
294
Targeting MC56F83xx/DSP5685x Controllers
Decimal integers are specified as a non-zero numeral, followed by numerals in the
range of zero through nine. To create a negative integer, use the minus sign (-) in front
of the number. Listing 10.14
shows examples of valid decimal integers that you can
write into your linker command file.
Listing 10.14 Sample Decimal Integers
_dec_num = 9999;
_decimalNumber = -1234;
Hexadecimal (base sixteen) integers are specified as 0x or 0X (a zero with an X),
followed by numerals in the range of zero through nine, and/or characters A through F.
Examples of valid hexadecimal integers that you can put in your linker command file
appear in Listing 10.15
.
Listing 10.15 Sample Hex Integers
_somenumber = 0x0F21;
_fudgefactorspace = 0XF00D;
_hexonyou = 0xcafe;
File Selection
When defining the contents of a SECTION block, specify the source files that are
contributing to their sections.
In a large project, the list can become very long. For this reason, you have to use the
asterisk (*) keyword. The * keyword represents the filenames of every file in your
project. Note that since you have already added the .text sections from the
main.c, file2.c, and file3.c files, the * keyword does not include the
.text sections from those files again.
Function Selection
The OBJECT keyword allows precise control over how functions are placed within a
section. For example, if the functions pad and foot are to be placed before
anything else in a section, use the code as shown in the example in Listing 10.16
.