4 ELF-64 Object File Format, Version 1.5 Draft 2
•
e_ident[EI_CLASS]
identifies the class of the object file, or its capacity.
Table 3 lists the possible values.
This document describes the structures for
ELFCLASS64
.
The class of the ELF file is independent of the data model assumed by the
object code. The
EI_CLASS
field identifies the file format; a processor-
specific flag in the
e_flags
field, described below, may be used to identify
the application’s data model if the processory supports multiple models.
•
e_ident[EI_DATA]
specifies the data encoding of the object file data
structures. Table 4 lists the encodings defined for ELF-64.
For the convenience of code that examines ELF object files at run time
(e.g., the dynamic loader), it is intended that the data encoding of the
object file will match that of the running program. For environments that
support both byte orders, a processor-specific flag in the
e_flags
field,
described below, may be used to identify the application’s operating mode.
•
e_ident[EI_VERSION
] identifies the version of the object file format.
Currently, this field has the value
EV_CURRENT
, which is defined with the
value
1
.
•
e_ident[EI_OSABI]
identifies the operating system and ABI for which the
object is prepared. Some fields in other ELF structures have flags and
values that have environment-specific meanings; the interpretation of
those fields is determined by the value of this field. Table 5 lists the
currently-defined values for this field.
•
e_ident[EI_ABIVERSION]
identifies the version of the ABI for which the object
is prepared. This field is used to distinguish among incompatible versions
of an ABI. The interpretation of this version number is dependent on the
ABI identified by the
EI_OSABI
field.
For applications conforming to the System V ABI, third edition, this field
should contain 0.
•
e_type
identifies the object file type. The processor-independent values
for this field are listed in Table 6.
•
e_machine
identifies the target architecture. These values are defined in
the processor-specific supplements.
•
e_version
identifies the version of the object file format. Currently, this
field has the value
EV_CURRENT
, which is defined with the value
1
.
•
e_entry
contains the virtual address of the program entry point. If there is
no entry point, this field contains zero.
•
e_phoff
contains the file offset, in bytes, of the program header table.
•
e_shoff
contains the file offset, in bytes, of the section header table.
•
e_flags
contains processor-specific flags.
•
e_ehsize
contains the size, in bytes, of the ELF header.
•
e_phentsize
contains the size, in bytes, of a program header table entry.
•
e_phnum
contains the number of entries in the program header table.
•
e_shentsize
contains the size, in bytes, of a section header table entry.
•
e_shnum
contains the number of entries in the section header table.