Cross-section Data Allocation Statements

Cross-section data allocation statements add data to a section that is not the current section. These statements save the overhead of switching between sections using the .section directive. See the Sections section for more information about switching between sections. Cross-section data allocation statements may be used within an explicit bundle. All data objects are aligned to their natural boundaries in the cross section. Cross-section data allocation statements have any of the following formats:

.xdata1    section,expression, ...

.xdata2    section,expression, ...

.xdata4    section,expression, ...

.xdata8    section,expression, ...

.xstring   section,"string",   ...

.xstringz  section,"string",   ...

Where:

section

Represents the name of a previously-defined section that is not the current section.

expression

Represents an absolute or relocatable integer expression. When these expressions reference a location counter, they refer to the location counter within the cross section, not within the current section.

string

Represents any of the valid string expression type values listed in the Data Allocation Statements table .

 

To disable automatic alignment of data objects in a cross-section data allocation statement, add the .ua completer to the statement, for example, .xdata4.ua. These statements allocate unaligned data objects at the current location counter of the cross section, not the current section.

The default byte order for cross-section data allocation statements is platform dependent. The byte order is determined by the cross section, not by the current section.