model specifies the model type for code generation.
When specifying the model type, it can be one of:
tiny
Generate code for the tiny code model. The program and its statically defined symbols must be within 1MB of each other.
small
Generate code for the small code model. The program and its statically defined symbols must be within 4GB of each other. This is the default code model.
large
[ALPHA] Generate code for the large code model. The compiler makes no assumptions about addresses and sizes of sections.
Operation
The compiler generates instructions that refer to global data through relative offset addresses. The model type specifies the maximum offset range, and therefore the size of the offset address. The actual required range of an offset is only known when the program is linked with other object files and libraries. If you know the final size of your program, you can specify the appropriate model so that the compiler generates optimal code for offsets.
If you specify a larger model than is required, then your code is unnecessarily larger.
If the model you choose is too small and the image does not fit in the bounds, then the linker reports an error.
Examples
[ALPHA] This example enables code generation for the large model:
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.