Controls the placement of sections that are placed using the
.ANY module selector.
is one of the following:
- Place the section in the execution region that currently has the least free space but is also sufficient to contain the section.
- Place the section in the first execution region that has sufficient space. The execution regions are examined in the order they are defined in the scatter file.
Place the section using the following rules:
- Place in the current execution region if there is sufficient free space.
- Place in the next execution region only if there is insufficient space in the current region.
- Never place a section in a previous execution region.
- Place the section in the execution region that currently has the most free space.
Use this option with the
The placement algorithms interact with scatter files and
- Interaction with normal scatter-loading rules
- Scatter-loading with or without
.ANYassigns a section to the most specific selector. All algorithms continue to assign to the most specific selector in preference to
.ANYpriority or size considerations.
- Interaction with
Priority is considered after assignment to the most specific selector in all algorithms.
best_fitconsider priority before their individual placement criteria. For example, you might have
.ANY2selectors, with the
.ANY1region having the most free space. When using
worst_fitthe section is assigned to .
ANY2because it has higher priority. Only if the priorities are equal does the algorithm come into play.
first_fitconsiders the most specific selector first, then priority. It does not introduce any more placement rules.
next_fitalso does not introduce any more placement rules. If a region is marked full during
next_fit, that region cannot be considered again regardless of priority.
- Interaction with
The priority of a
.ANYselector is reduced to
0if the region might overflow because of linker-generated content. This is enabled and disabled independently of the sorting and placement algorithms.
armlinkcalculates a worst-case contingency for each section.
first_fit, when a region is about to overflow because of the contingency,
armlinklowers the priority of the related
next_fit, when a possible overflow is detected, armlink marks that section as
FULLand does not consider it again. This stays consistent with the rule that when a section is full it can never be revisited.
The default option is