SPRAB89A September 2011 – March 2014
The program header attributes are encoded in a <segment id, tag, value> triplet, which can be represented as shown here:
typedef struct
{
Elf32_Half pha_seg_id; /* Segment id */
Elf32_Half pha_tag_id; /* Attribute kind id */
Union
{
Elf32_Off pha_offset; /* byte offset within the .TI.phattrs section */
Elf32_Word pha_value; /* Constant tag value */
} pha_un;
} Elf32_TI_PHAttrs;
Both the segment id and the tag id are encoded as 2-byte unsigned integers in the byte order of the ELF file. The fields in the union pha_un is encoded as 4-byte unsigned integer in the byte order of the ELF file. This representation is modeled after the <tag, value> representation of dynamic tags.
The value of the tag can be an inlined 32-bit constant or an offset into the .TI.phattrs section that points to a fixed length binary data (FLBD) or a null terminated byte string (NTBS). The fixed-length binary data size should be 32-bits aligned.
If the extended program header attributes segment is present, it is terminated by a PHA_NULL tag.
Attribute tag values and properties are assigned and maintained by TI and are processor-specific. All the undefined values are reserved for future use.
The attribute tag determines how the value of pha_un is interpreted. Each attribute has pre-defined behavior. The pha_un field can be interpreted as pha_value or pha_offset, or may be unused. If pha_offset is used, the value points to either NTBS or FLBD. If pha_offset is interpreted as FLBD, the length of the field shall be pre-defined.