4.4. Directives that Initialize Values and Strings¶
The following data-defining directives assemble numeric values in the current section. This has the effect of initializing space with one or more values as specified in the operand list field. The size of the space initialized for each value in the operand list is determined by the directive.
The following directives assemble string values in the current section or output the contents of the literal pool to the current section.
4.4.1. Operand List¶
The operand list for directives may contain a list of one or more expr operands separated by commas. Each expr operand is an arithmetic expression that can eventually be resolved to an integer constant by the tiarmclang assembler or the linker in the process of building a static executable.
An expr operand represented as an arithmetic expression may be in one of the following forms at assembly time:
For an arithmetic expression that results in an absolute value at assembly time, the assembler encodes the result of the expression in the field defined by the directive.
If an expression cannot be evaluated at assembly time, then the assembler generates relocations and the value will be computed at link time. For example, for an arithmetic expression that resolves to a single label symbol plus an optional integer constant, the assembler creates a relocation entry for the label symbol reference and includes the relocation entry in the object file that is written by the assembler.
If the operand list is empty, then the directive does nothing.
If the result of an expression will not fit in the size indicated by the directive, a warning message is provided and the least significant bytes of the expression’s value that fit are used.