Specifies the sorting algorithm used by the linker to determine the order of sections in an output image.
is one of the following:
Sorts input sections by ascending order of alignment value.
Sorts input sections by ascending order of alignment value, then sorts lexically.
Sorts all Thumb code before ARM code and then sorts according to the approximated average call depth of each section in ascending order.
Use this algorithm to minimize the number of long branch veneers.Note The approximation of the average call depth depends on the order of input sections. Therefore, this sorting algorithm is more dependent on the order of input sections than using, say,
This is similar to the
CallTreealgorithm except that it uses a breadth-first traversal when flattening the Call Tree into a list.
The linker flattens the call tree into a list containing the read-only code sections from all execution regions that have
Sections in this list are copied back into their execution regions, followed by all the non read-only code sections, sorted lexically. Doing this ensures that sections calling each other are placed close together.Note This sorting algorithm is less dependent on the order of input sections than using either
Sorts according to the name of the section and then by input order if the names are the same.
Sorts input sections lexically, then according to the name of the section, and then by input order if the names are the same.
Sorts Thumb code before ARM code, then sorts lexically.
Provides a list of the available sorting algorithms. The linker terminates after displaying the list.
Sorts code sections by tiebreaker. All other sections are sorted lexically. This is most useful when used with
--tiebreaker=cmdlinebecause it attempts to group all the sections from the same object together in the memory map.
Sorts all Thumb code before ARM code and then sorts according to the running depth of the section in ascending order. The running depth of a section S is the average call depth of all the sections that call S, weighted by the number of times that they call S.
Use this algorithm to minimize the number of long branch veneers.
The sorting algorithms conform to the standard rules, placing input sections in ascending order by attributes.
You can also specify sort algorithms in a scatter file for individual execution regions.
SORTTYPE keyword to do this.
SORTTYPEexecution region attribute overrides any sorting algorithm that you specify with this option.
The default algorithm is
--sort=Lexical. In large region mode, the default