3.2.1. Ordering input sections by attribute
Portions of the image are collected together into a minimum number of contiguous regions. armlink orders input sections by attribute as follows:
read-only code
read-only data
read‑write code
read‑write data
zero‑initialized data.
Input sections that have the same attributes are ordered by name. Names are considered to be case‑sensitive and are compared in alphabetical order using the ASCII collation sequence for characters.
Identically attributed and named input sections are ordered according to their relative positions in the input list.
These rules mean that the positions of identically attributed and named input sections included from libraries are not predictable. If more precise positioning is required, you can extract modules manually and include them in the input list.