--any_sort_order=order linker option
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.
Sort input sections by command-line index.
By default, sections that have the same properties are resolved using the creation index. You can use the --tiebreaker command-line option to resolve sections by the order they appear on the linker command-line.
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 descending_size.