--any_sort_order=order
Controls the sort order of input sections that are placed using the .ANY
module selector.
Syntax
--any_sort_order=order
where
is one of the following:order
descending_size
- Sort input sections in descending size order.
cmdline
-
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 theSection
in theObject
.Object
is the order thatObject
appears in theFile
.File
is the order theFile
appears on the command line.
The order the
Object
appears in theFile
is only significant if the file is anar
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.
Usage
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.
Default
The default option is --any_sort_order=descending_size
.