| |||
| Home > Linker Command-line Options > Command-line options listed alphabetically > --largeregions, --no_largeregions | |||
This option controls the sorting order of sections in large execution regions to minimize the distance between sections that call each other.
If the execution region contains more code than the range of a branch instruction then the linker switches to large region mode. In this mode the linker sorts according to the approximated average call depth of each section in ascending order. The linker might also place distribute veneers amongst the code sections to minimize the number of veneers.
Large region mode can result in large changes to the layout of an image even when small changes are made to the input.
To disable large region mode and revert to lexical order,
use --no_largeregions. Section placement is then
predictable and image comparisons are more predictable. However some
branches might not reach the target causing the link step to fail.
If this happens you must place code/data sections explicitly using
an appropriate scatter-loading description file or write your own
veneer.
The default option is --no_largeregions.
However, if at least one execution region contains more code than
the smallest inter-section branch then the default option is --largeregions.
The smallest inter-section branch depends on the code in the region
and the target processor:
Execution region contains only ARM.
Execution region contains Thumb, Thumb-2 is supported.
Execution region contains Thumb, no Thumb-2 support.
Veneers in the Linker User Guide.