4.1.6 Allocation conditions for data and function

The allocation conditions for data and functions are as follows.

-

1Static variables and functions in a single section are allocated in the order of their definitions; that is, when data (or function) A and data (or function) B are allocated in the same section S and A is defined before B in a program, A is allocated to a smaller address than that of B in section S.

-

Alignment of static variables and functions conforms to the alignment condition for the static variables and functions regardless of the type of the section; that is, even if a variable having an alignment value of 1 is allocated to a section having an alignment value of 2, the variable is aligned with a 1-byte boundary, and a variable having an alignment value of 2 cannot be allocated to a section having an alignment value of 1.