SPRAB89A September 2011 – March 2014
The ELF header provides a number of fields that guide interpretation of the file. Most of these are specified in the System V ELF specification. This section augments the base standard with specific details for the C6000.
e_indent
The 16-byte ELF identification field identifies the file as an object file and provides machine-independent data with which to decode and interpret the file's contents. Table 13-2 specifies the values to be used for C6000 object files.
Index | Symbolic Value | Numeric Value | Comments |
---|---|---|---|
EI_MAG0 | 0x7f | Per System V ABI | |
EI_MAG1 | E | Per System V ABI | |
EI_MAG2 | L | Per System V ABI | |
EI_MAG3 | F | Per System V ABI | |
EI_CLASS | ELFCLASS32 | 1 | 32-bit ELF |
EI_DATA | ELFDATA2LSB | 1 | Little-endian |
ELFDATA2MSB | 2 | Big-endian | |
EI_VERSION | EV_CURRENT | 1 | |
EI_OSABI | ELFOSABI_C6000_ELFABI | 64 | Bare-metal dynamic linking platform |
EI_OSABI | ELFOSABI_C6000_LINUX | 65 | MMU-less Linux platform |
EI_ABIVERSION | 0 |
The EI_OSABI field shall be ELFOSABI_NONE unless overridden by the conventions of a specific platform. The bare-metal dynamic linking model (Section 14.5) and Linux (Chapter 15) are two such platforms that define specific values for this field.
A value other than ELFOSABI_NONE represents an assertion that the file conforms to the conventions of the particular ABI variant corresponding to the specified value. Only such files are valid for that specific platform. Objects can be built for platforms other than the specific variants defined by the ABI; these should be identified as ELFOSABI_NONE, representing the lack of any assertion. The determination of whether such a file is compatible with a given environment is independent of the ABI.
e_type
There are currently no C6000-specific object file types. All values between ET_LOPROC and ET_HIPROC are reserved to future revisions of this specification.
e_machine
An object file conforming to this specification must have the value EM_TI_C6000 (140, 0x8c).
e_entry
The base ELF specification requires this field to be zero if an application does not have an entry point. Nonetheless, some applications may require an entry point of zero (for example, via the reset vector).
A platform standard may specify that an executable file always has an entry point, in which case e_entry specifies that entry point, even if zero.
e_flags
This member holds processor-specific flags associated with the file. There is one C6000-specific flag.
Name | Value | Comment |
---|---|---|
EF_C6000_REL | 0x1 | File contains static relocation information |
The EF_C6000_REL flag is to indicate the presence of static relocation information in an executable file (ET_EXEC) or shared object (ET_DYN). A shared object with static relocation information is called a relocatable module and is generally used for libraries that can be linked statically or dynamically.