Linker User GuidePreface Overview of the Linker Linking Models Supported by armlink Image Structure and Generation Linker Optimization Features Getting Image Details Accessing and Managing Symbols with armlink Scatter-loading Features The scatter-loading mechanism Overview of scatter-loading When to use scatter-loading Linker-defined symbols that are not defined when s Specifying stack and heap using the scatter file Scatter-loading command-line options Scatter-loading images with a simple memory map Scatter-loading images with a complex memory map Scatter file with link to bit-band objects Root execution regions Root execution region and the initial entry point Root execution regions and the ABSOLUTE attribute Root execution regions and the FIXED attribute Methods of placing functions and data at specific Placement of code and data with __attribute__((sec Placement of __at sections at a specific address Restrictions on placing __at sections Automatic placement of __at sections Manual placement of __at sections Placement of a key in flash memory with an __at se Mapping a structure over a peripheral register wit Example of how to explicitly place a named section Placement of unassigned sections with the .ANY mod Placement rules when using multiple .ANY selectors Command-line options for controlling the placement Prioritization of .ANY sections Specify the maximum region size permitted for plac Examples of using placement algorithms for .ANY se Example of next_fit algorithm showing behavior of Examples of using sorting algorithms for .ANY sect Behavior when .ANY sections overflow because of li Placement of veneer input sections in a scatter fi Placement of sections with overlays Reserving an empty region Placement of ARM C and C++ library code Specifying ARM standard C and C++ libraries in a s Example of placing code in a root region Example of placing ARM C library code Example of placing ARM C++ library code Example of placing ARM library helper functions Creation of regions on page boundaries Overalignment of execution regions and input secti Preprocessing of a scatter file Example of using expression evaluation in a scatte Equivalent scatter-loading descriptions for simple Command-line options for creating simple images Type 1 image, one load region and contiguous execu Type 2 image, one load region and non-contiguous e Type 3 image, multiple load regions and non-contig How the linker resolves multiple matches when proc How the linker resolves path names when processing Scatter file to ELF mapping Scatter File Syntax Linker Command-line Options Linker Steering File Command Reference Via File Syntax
Behavior when .ANY sections overflow because of linker-generated content
7.4.8 Behavior when .ANY sections overflow because of linker-generated content
Because linker-generated content might cause
The linker does not know the address of a section until it is assigned to a region. Therefore, when filling
The following diagram represents the notional image layout during
Figure 7-4 .ANY contingency
The downward arrows for prospective padding show that the prospective padding continues to grow as more sections are added to the
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
You can use the armlink command-line option
The following shows an example of the information generated:
============================================================================== Sorting unassigned sections by descending size for .ANY placement. Using Worst Fit .ANY placement algorithm. .ANY contingency enabled. Exec Region Event Idx Size Section Name Object ER_1 Assignment: Worst fit 158 0x000001d6 .text c_w.l(flsbuf.o) ER_3 Assignment: Worst fit 83 0x00000138 .text c_w.l(initio.o) ER_2 Assignment: Worst fit 289 0x000000f8 .text c_w.l(fseek.o) ER_3 Assignment: Worst fit 291 0x000000f0 .text c_w.l(stdio.o) ... ER_2 Assignment: Worst fit 3 0x0000005c .text foo.o ... .ANY contingency summary Exec Region Contingency Type ER_1 53 Auto ER_2 48 Auto ER_3 59 Auto ============================================================================== Sorting unassigned sections by descending size for .ANY placement. Using Worst Fit .ANY placement algorithm. .ANY contingency enabled. Exec Region Event Idx Size Section Name Object ER_1 Info: .ANY limit reached - - - - ER_3 Info: .ANY limit reached - - - - ER_2 Info: .ANY limit reached - - - - ER_3 Assignment: Worst fit 405 0x00000034 !!!scatter c_w.l(__scatter.o) ER_3 Assignment: Worst fit 407 0x0000001c !!handler_zi c_w.l(__scatter_zi.o)
7.4.2 Command-line options for controlling the placement of input sections for multiple .ANY selectors
of your data.