Chapter 3. Sections

Sections Types

A section header's sh_type member specifies the sections's semantics.

ELF Section Types

The following section types are defined in the System V Application Binary Interface, Edition 4.1.

Table 3-1. ELF Section Types

NameValueDescription
SHT_DYNAMIC0x6The 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_DYNSYM0xb 
SHT_FINI_ARRAY0xfThis 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_HASH0x5The 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_HIPROC0x7fffffffValues in this inclusive range are reserved for processor-specific semantics.
SHT_HIUSER0xffffffffThis 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_ARRAY0xeThis 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_LOPROC0x70000000Values in this inclusive range are reserved for processor-specific semantics.
SHT_LOUSER0x80000000This value specifies the lower bound of the range of indexes reserved for application programs.
SHT_NOBITS0x8A 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_NOTE0x7The section holds information that marks the file in some way. See `Note Section' in Chapter 5 for details.
SHT_NULL0x0This 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_ARRAY0x10This 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_PROGBITS0x1The section holds information defined by the program, whose format and meaning are determined solely by the program.
SHT_REL0x9The 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_RELA0x4The 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_SHLIB0xaThis section type is reserved but has unspecified semantics.
SHT_STRTAB0x3The section holds a string table. An object file may have multiple string table sections. See `String Table' below for details.
SHT_SYMTAB0x2These 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.