SPRAB89A September 2011 – March 2014
The program header contains the following fields.
p_type
The C6000 defines one processor-specific segment type for the p_type field in the program header.
Name | Value | Comment |
---|---|---|
PT_C6000_PHATTR | 0x70000000 | Extended Segment Attributes |
The PT_C6000_PHATTR segment type identifies the segment as containing additional descriptive information about the other PT_LOAD segments in the program. The segment contains a single section of type SHT_TI_PHATTRS. Program header attributes are described in more detail in Chapter 19.
p_vaddr, p_paddr
The C6000 does not currently have virtual addressing. Both the p_vaddr and p_paddr fields indicate the execution address of the segment. Segments that are loaded at one address and copied to another to execute are represented in the object file by two distinct segments: a load-image segment containing the segment's code or data whose address fields refer to the load address; and an uninitialized run-image segment whose address fields refer to the run address. The application is responsible for copying the contents of the load image to the run address at the appropriate time.
p_flags
There is one processor-specific segment flag defined for C6000.
Name | Value | Comment |
---|---|---|
PF_C6000_DPREL | 0x10000000 | Accessed using DP-relative addressing |
The PF_C6000_DPREL flag identifies segments that are accessed using DP-relative addressing, and therefore subject to post-link placement constraints. A position independent module will not typically contain dynamic relocations for DP-relative addressing. If there are multiple DP-relative segments, their position relative to the DP (and therefore to each other) must be maintained. This flag serves to identify such segments to a dynamic loader or other post-link agent so that it can coordinate their allocation.
There are some secondary segment attributes that are used by the TI toolchain. Due to the limited number of available flags, we have defined an alternate mechanism for additional segment attributes: the program header attributes table described in Chapter 19.
p_align
As described in the System V ABI, loadable segments are aligned in the file such that their p_vaddr (address in memory) and p_offset (offset in the file) are congruent, modulo p_align. In systems with virtual memory, p_align generally specifies the page size. Unless specified for a specific platform, for the C6000 the meaning and setting of p_align is unspecified.