7.4.8 Behavior when .ANY sections overflow because of linker-generated content

Because linker-generated content might cause .ANY regions to overflow, a contingency algorithm is included in the linker.

The linker does not know the address of a section until it is assigned to a region. Therefore, when filling .ANY regions, the linker cannot calculate the contingency space and cannot determine if calling functions require veneers. The linker provides a contingency algorithm that gives a worst-case estimate for padding and an additional two percent for veneers. To enable this algorithm use the --any_contingency command-line option.
The following diagram represents the notional image layout during .ANY placement:
Figure 7-4 .ANY contingency
To view this graphic, your browser must support the SVG format. Either install a browser with native support, or install an appropriate plugin such as Adobe SVG Viewer.

The downward arrows for prospective padding show that the prospective padding continues to grow as more sections are added to the .ANY selector.
Prospective padding is dealt with before the two percent veneer contingency.
When the prospective padding is cleared the priority is set to zero. When the two percent is cleared the priority is decremented again.
You can also use the ANY_SIZE keyword on an execution region to specify the maximum amount of space in the region to set aside for .ANY section assignments.
Related concepts
7.4.3 Prioritization of .ANY sections
7.4.2 Command-line options for controlling the placement of input sections for multiple .ANY selectors
7.4.4 Specify the maximum region size permitted for placing unassigned sections
Related reference
8.4.3 Execution region attributes
8.5.2 Syntax of an input section description
9.1 --any_contingency
Non-ConfidentialPDF file icon PDF versionARM DUI0377G
Copyright © 2007, 2008, 2011, 2012, 2014, 2015 ARM. All rights reserved.