![background image](http://html.mh-extra.com/html/texas-instruments/tms320c54x/tms320c54x_user-manual_1097113266.webp)
Default Allocation Algorithm
7-54
7.12.2 General Rules for Output Sections
An output section can be formed in one of two ways:
Rule 1
As the result of a SECTIONS directive definition.
Rule 2
By combining input sections with the same names into an out-
put section that is not defined in a SECTIONS directive.
If an output section is formed as a result of a SECTIONS directive (rule 1), this
definition completely determines the section’s contents. (See Section 7.8,
The
SECTIONS Directive, on page 7-32 for examples of how to define an output
section’s content.)
An output section can also be formed when input sections are not specified by
a SECTIONS directive (rule 2). In this case, the linker combines all such input
sections that have the same name into an output section with that name. For
example, suppose the files f1.obj and f2.obj both contain named sections
called Vectors and that the SECTIONS directive does not define an output
section for them. The linker combines the two Vectors sections from the input
files into a single output section named Vectors, allocates it into memory, and
includes it in the output file.
After the linker determines the composition of all output sections, it must allo-
cate them into configured memory. The MEMORY directive specifies which
portions of memory are configured; if there is no MEMORY directive, the linker
uses the default configuration.
The linker’s allocation algorithm attempts to minimize memory fragmentation.
This allows memory to be used more efficiently and increases the probability
that your program will fit into memory. This is the algorithm:
1) Output sections for which you have supplied a specific binding address
are placed in memory at that address.
2) Output sections that are included in a specific, named memory range or
that have memory attribute restrictions are allocated. Each output section
is placed into the first available space within the named area, considering
alignment where necessary.
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: ......