A section header's sh_type member specifies the sections's semantics.
The following section types are defined in the System V Application Binary Interface, Edition 4.1.
Table 3-1. ELF Section Types
Name | Value | Description |
---|---|---|
SHT_DYNAMIC | 0x6 | The section holds information for dynamic linking. Currently, an object file may have only one dynamic section, but this restriction may be relaxed in the future. See `Dynamic Section' in Chapter 5 for details. |
SHT_DYNSYM | 0xb | |
SHT_FINI_ARRAY | 0xf | This section contains an array of pointers to termination functions, as described in `Initialization and Termination Functions' in Chapter 5. Each pointer in the array is taken as a parameterless procedure with a void return. |
SHT_HASH | 0x5 | The section holds a symbol hash table. Currently, an object file may have only one hash table, but this restriction may be relaxed in the future. See `Hash Table' in the Chapter 5 for details. |
SHT_HIPROC | 0x7fffffff | Values in this inclusive range are reserved for processor-specific semantics. |
SHT_HIUSER | 0xffffffff | This value specifies the upper bound of the range of indexes reserved for application programs. Section types between SHT_LOUSER and SHT_HIUSER may be used by the application, without conflicting with current or future system-defined section types. |
SHT_INIT_ARRAY | 0xe | This section contains an array of pointers to initialization functions, as described in `Initialization and Termination Functions' in Chapter 5. Each pointer in the array is taken as a parameterless procedure with a void return. |
SHT_LOPROC | 0x70000000 | Values in this inclusive range are reserved for processor-specific semantics. |
SHT_LOUSER | 0x80000000 | This value specifies the lower bound of the range of indexes reserved for application programs. |
SHT_NOBITS | 0x8 | A section of this type occupies no space in the file but otherwise resembles SHT_PROGBITS. Although this section contains no bytes, the sh_offset member contains the conceptual file offset. |
SHT_NOTE | 0x7 | The section holds information that marks the file in some way. See `Note Section' in Chapter 5 for details. |
SHT_NULL | 0x0 | This value marks the section header as inactive; it does not have an associated section. Other members of the section header have undefined values. |
SHT_PREINIT_ARRAY | 0x10 | This section contains an array of pointers to functions that are invoked before all other initialization functions, as described in `Initialization and Termination Functions' in Chapter 5. Each pointer in the array is taken as a parameterless proceure with a void return. |
SHT_PROGBITS | 0x1 | The section holds information defined by the program, whose format and meaning are determined solely by the program. |
SHT_REL | 0x9 | The section holds relocation entries without explicit addends, such as type Elf32_Rel for the 32-bit class of object files or type Elf64_Rel for the 64-bit class of object files. An object file may have multiple relocation sections. See "Relocation" |
SHT_RELA | 0x4 | The section holds relocation entries with explicit addends, such as type Elf32_Rela for the 32-bit class of object files or type Elf64_Rela for the 64-bit class of object files. An object file may have multiple relocation sections. `Relocation' b |
SHT_SHLIB | 0xa | This section type is reserved but has unspecified semantics. |
SHT_STRTAB | 0x3 | The section holds a string table. An object file may have multiple string table sections. See `String Table' below for details. |
SHT_SYMTAB | 0x2 | These sections hold a symbol table. Currently, an object file may have only one section of each type, but this restriction may be relaxed in the future. Typically, SHT_SYMTAB provides symbols for link editing, though it may also be used for dynamic linking. |
The following additional section types are defined here.
Table 3-2. Additional Section Types
Name | Value | Description |
---|---|---|
SHT_GNU_verdef | 0x6ffffffd | This section contains the symbol versions that are provided. |
SHT_GNU_verneed | 0x6ffffffe | This section contains the symbol versions that are required. |
SHT_GNU_versym | 0x6fffffff | This section contains the Symbol Version Table. |