SPRAB89A September 2011 – March 2014
Tag_ISA (=4), ULEB128
This tag specifies the C6000 ISA(s) that can execute the instructions encoded in the file. The following values are defined:
0 | No ISA specified | |
1 | C62x | |
2 | Reserved | |
3 | C67x | |
4 | C67x+ | |
5 | Reserved | |
6 | C64x | |
7 | C64x+ | |
8 | C6740 | |
9 | Tesla | |
10 | C6600 |
This tag determines object compatibility as follows. Here, the transitive relation A < B means that B is compatible with A; that is, B can execute code generated for either A or B. When combining attributes, the greatest ISA that can execute both (B in this case) should be used.
C6000 ISA compatibility is illustrated by the following directed graph in which an edge A→B represents the compatibility relation A < B.
Tag_ABI_wchar_t, (=6), ULEB128
0 | wchar_t is not used. | |
1 | The size of wchar_t is 2 bytes. | |
2 | The size of wchar_t is 4 bytes. |
Section 2.2 specifies wchar_t as unsigned int. However, in some circumstances the TI toolchain defines wchar_t as unsigned short. This tag enables detection of any incompatibility resulting from this violation.
Tag_ABI_stack_align_needed, (=8), ULEB128
0 | Code requires 8-byte stack alignment at function boundaries. | |
1 | Code requires 16-byte stack alignment at function boundaries. |
Tag_ABI_stack_align_preserved, (=10), ULEB128
0 | Code requires 8-byte stack alignment at function boundaries. | |
1 | Code requires 16-byte stack alignment at function boundaries. |
All currently supported ISAs use 8-byte stack alignment. 16-byte alignment is anticipated for future ISAs.
Code that requires 16-byte stack alignment is not compatible with code that only preserves 8-bute alignment. When merging tags, the result should reflect the smallest alignment given by TAG_ABI_stack_align_preserved, and the largest alignment given by TAG_ABI_stack_align_needed.
Tag_ABI_DSBT, (=12), ULEB128
0 | DSBT addressing is not used. | |
1 | DSBT addressing is used. |
Tag_ABI_PID, (=14), ULEB128
0 | Data addressing is position dependent. | |
1 | Data addressing is position independent; GOT is accessed using near DP addressing. | |
2 | Data addressing is position independent; GOT is accessed using far DP addressing. |
An object file with a non-zero Tag_ABI_PID uses no absolute addressing for data. All data is addressed using either DP-relative, GOT, or in the case of read-only constants, PC-relative addressing. Such an object can have the location of its DP-relative data segment assigned dynamically, without requiring relocation, as required by a shared object.
A value of 2 indicates that the object relies on far GOT-based addressing (see Section 6.7). That is, the GOT itself is far.
Tag_ABI_PIC, (=16), ULEB128
0 | Addressing conventions are unsuitable for a shared object. | |
1 | Addressing conventions are suitable for a shared object. |
Tag_ABI_PIC indicates that the object follows the addressing conventions required for a shared object, in particular that all references to imported variables are addressed via the GOT.
When linking a shared library, the linker should enforce the presence of this tag on all the objects that comprise the library.
The name Tag_ABI_PIC may be misleading. The term position independence may imply several related properties, which may or may not equate to the properties required for a shared object. Hence this attribute is defined in terms of the latter set.
Tag_ABI_array_object_alignment, (=18), ULEB128
0 | Array variables are aligned on 8 byte boundaries. | |
1 | Array variables are aligned on 4-byte boundaries. | |
2 | Array variables are aligned on 16-byte boundaries. |
Tag_ABI_array_object_align_expected,(=20), ULEB128
0 | Code assumes 8-byte alignment for array variables. | |
1 | Code assumes 4-byte alignment for array variables. | |
2 | Code assumes 16-byte alignment for array variables. |
The preceding two tags apply to array variables with external visibility, as discussed in Section 2.7. For compatibility, the alignment value indicated by the TAB_ABI_array_align_expected tag must be less than or equal to the alignment value indicated by the TAG_ABI_array_object_alignment tag. When merging tags, the result should reflect the smallest alignment given by TAG_ABI_array_object_alignment, and the largest alignment given by TAG_ABI_array_object_align_expected.
Tag_ABI_compatibility, (=32), ULEB128, char[]
This tag enables vendors to arrange specific compatibility conventions beyond the scope of the ABI. It has two operands, a ULEB128 flag and a NULL-terminated string. The string specifies the name of the extra-ABI convention, as defined by the arranging vendor. The flag characterizes the object with respect to the convention. In the following description, the term ABI-compatible means compliant with this ABI, and compatible according to the conditions set forth in this document, such as other build attribute tags. The flag values are:
0 | The object has no toolchain-specific compatibility requirements, and is therefore compatible with any other ABI-compatible object. | |
1 | The object is compatible with other ABI-compatible objects provided that it is processed by a toolchain that complies with the named convention (for example, if the convention names a vendor, that vendor's toolchain). | |
N>1 | The object is not compatible with the ABI, but may be compatible with other objects under the named convention. In this case the interpretation of the flag is defined by the convention. |
Note that the string identifies the extra-ABI convention, not necessarily the toolchain that produced the file.
If the ABI compatibility tag is omitted, it as the same meaning as a tag with flag value 0 (no additional compatibility requirements).
Tag_ABI_conformance, (=67), char[]
This tag specifies the version of the ABI to which the object conforms. The tag value is a NULL-terminated string containing the ABI version. The version specified in this standard is “1.0”. Digits following the decimal point are informational only and do not affect compatibility checking.
To simplify recognition by consumers for the common case in which the while file conforms to the ABI, this tag should be the first attribute in the first attribute vector in the C6000 subsection.
Table 17-1 summarizes the build attribute tags defined by the ABI.
Tag | Tag Value | Parameter Type | Compatibility Rules |
---|---|---|---|
Tag_File | 1 | uint32 | |
Tag_Section | 2 | uint32 | |
Tag_Symbol | 3 | uint32 | |
Tag_ISA | 4 | ULEB128 | See previous description |
Tag_ABI_wchar_t | 6 | ULEB128 | If not zero, must match exactly |
Tag_ABI_stack_align_needed | 8 | ULEB128 | Must be compatible with Tag_ABI_stack_align_preserved.
Combine using max value. |
Tag_ABI_stack_align_preserved | 10 | ULEB128 | Must be compatible with Tag_ABI_stack_align_needed.
Combine using min value. |
Tag_ABI_DSBT | 12 | ULEB128 | Exact |
Tag_ABI_PID | 14 | ULEB128 | Warn if different; combine using min value. |
Tag_ABI_PIC | 16 | ULEB128 | Warn if absent when building shared library; combine using min value. |
TAG_ABI_array_object_alignment | 18 | ULEB128 | Must be at least alignment from TAG_ABI_array_object_align_expected.
Combine using max alignment. |
TAG_ABI_array_object_align_expected | 20 | ULEB128 | Must be <= alignment from TAG_ABI_array_object_alignment.
Combine using min alignment. |
Tag_ABI_compatibility | 32 | ULEB128 char[] | See description in text. |
Tag_ABI_conformance | 67 | char[] | Unspecified |