You copied the Doc URL to your clipboard.

ARM Compiler armlink User Guide : --any_sort_order=order


Controls the sort order of input sections that are placed using the .ANY module selector.



where order is one of the following:

Sort input sections in descending size order.

The order that the section appears on the linker command-line. The command-line order is defined as File.Object.Section where:

  • Section is the section index, sh_idx, of the Section in the Object.
  • Object is the order that Object appears in the File.
  • File is the order the File appears on the command line.

The order the Object appears in the File is only significant if the file is an ar archive.

By default, sections that have the same properties are resolved using the creation index. The --tiebreaker command-line option does not have any effect in the context of --any_sort_order.

Use this option with the --scatter option.


The sorting governs the order that sections are processed during .ANY assignment. Normal scatter-loading rules, for example RO before RW, are obeyed after the sections are assigned to regions.


The default option is --any_sort_order=descending_size.