9.63 --largeregions, --no_largeregions

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. The linker automatically switches on --veneerinject if it is needed for a branch to reach the veneer.
Large region support enables:
  • Average call depth sorting, --sort=AvgCallDepth.
  • API sorting, --api.
  • Veneer injection, --veneerinject.
The following command lines are equivalent:
armlink --largeregions --no_api --no_veneerinject --sort=Lexical
armlink --no_largeregions


The default is --no_largeregions. The linker automatically switches to --largeregions if at least one execution region contains more code than the smallest inter-section branch. The smallest inter-section branch depends on the code in the region and the target processor:
Execution region contains only ARM instructions.
Execution region contains Thumb instructions and the processor supports Thumb-2 technology.
Execution region contains Thumb instructions and the processor does not support Thumb-2 technology.
Related concepts
3.6 Linker-generated veneers
3.6.2 Veneer sharing
3.6.3 Veneer types
3.6.4 Generation of position independent to absolute veneers
Related reference
9.4 --api, --no_api
9.108 --sort=algorithm
9.130 --veneer_inject_type=type
9.129 --veneerinject,--no_veneerinject
Non-ConfidentialPDF file icon PDF versionARM DUI0377G
Copyright © 2007, 2008, 2011, 2012, 2014, 2015 ARM. All rights reserved.