Various sections hold program and control information. Sections in the lists below are used by the system and have the indicated types and attributes.
The following sections are defined in the System V Application Binary Interface, Edition 4.1.
Table 4-1. ELF Special Sections
Name | Type | Attributes |
---|---|---|
.bss | SHT_NOBITS | SHF_ALLOC+SHF_WRITE |
.comment | SHT_PROGBITS | 0 |
.data | SHT_PROGBITS | SHF_ALLOC+SHF_WRITE |
.data1 | SHT_PROGBITS | SHF_ALLOC+SHF_WRITE |
.debug | SHT_PROGBITS | 0 |
.dynamic | SHT_DYNAMIC | SHF_ALLOC+SHF_WRITE |
.dynstr | SHT_STRTAB | SHF_ALLOC |
.dynsym | SHT_DYNSYM | SHF_ALLOC |
.fini | SHT_PROGBITS | SHF_ALLOC+SHF_EXECINSTR |
.fini_array | SHT_FINI_ARRAY | SHF_ALLOC+SHF_WRITE |
.hash | SHT_HASH | SHF_ALLOC |
.init | SHT_PROGBITS | SHF_ALLOC+SHF_EXECINSTR |
.init_array | SHT_INIT_ARRAY | SHF_ALLOC+SHF_WRITE |
.interp | SHT_PROGBITS | SHF_ALLOC |
.line | SHT_PROGBITS | 0 |
.note | SHT_NOTE | 0 |
.preinit_array | SHT_PREINIT_ARRAY | SHF_ALLOC+SHF_WRITE |
.rodata | SHT_PROGBITS | SHF_ALLOC |
.rodata1 | SHT_PROGBITS | SHF_ALLOC |
.shstrtab | SHT_STRTAB | 0 |
.strtab | SHT_STRTAB | SHF_ALLOC |
.symtab | SHT_SYMTAB | SHF_ALLOC |
.text | SHT_PROGBITS | SHF_ALLOC+SHF_EXECINSTR |
This section holds uninitialized data that contribute to the program's memory image. By definition, the system initializes the data with zeros when the program begins to run. The section occupies no file space, as indicated by the section type, SHT_NOBITS
This section holds version control information.
This section holds initialized data that contribute to the program's memory image.
This section holds initialized data that contribute to the program's memory image.
This section holds information for symbolic debugging. The contents are unspecified. All section names with the prefix .debug are reserved for future use in the ABI.
This section holds dynamic linking information. The section's attributes will include the SHF_ALLOC bit. Whether the SHF_WRITE bit is set is processor specific. See Chapter 5 for more information.
This section holds strings needed for dynamic linking, most commonly the strings that represent the names associated with symbol table entries. See Chapter 5 for more information.
This section holds the dynamic linking symbol table, as described in `Symbol Table'. See Chapter 5 for more information.
This section holds executable instructions that contribute to the process termination code. That is, when a program exits normally, the system arranges to execute the code in this section.
This section holds an array of function pointers that contributes to a single termination array for the executable or shared object containing the section.
This section holds a symbol hash table. See `Hash Table' in Chapter 5 for more information.
This section holds executable instructions that contribute to the process initialization code. When a program starts to run, the system arranges to execute the code in this section before calling the main program entry point (called main for C programs)
This section holds an array of function pointers that contributes to a single initialization array for the executable or shared object containing the section.
This section holds the path name of a program interpreter. If the file has a loadable segment that includes relocation, the sections' attributes will include the SHF_ALLOC bit; otherwise, that bit will be off. See Chapter 5 for more information.
This section holds line number information for symbolic debugging, which describes the correspondence between the source program and the machine code. The contents are unspecified.
This section holds information in the format that `Note Section' in Chapter 5 describes of the System V Application Binary Interface, Edition 4.1.
This section holds an array of function pointers that contributes to a single pre-initialization array for the executable or shared object containing the section.
This section holds read-only data that typically contribute to a non-writable segment in the process image. See `Program Header' in Chapter 5 for more information.
This section hold sread-only data that typically contribute to a non-writable segment in the process image. See `Program Header' in Chapter 5 for more information.
This section holds section names.
This section holds strings, most commonly the strings that represent the names associated with symbol table entries. If the file has a loadable segment that includes the symbol string table, the section's attributes will include the SHF_ALLOC bit; otherwi
This section holds a symbol table, as `Symbol Table'. in this chapter describes. If the file has a loadable segment that includes the symbol table, the section's attributes will include the SHF_ALLOC bit; otherwise, that bit will be off.
This section holds the `text,' or executable instructions, of a program.
The following additional sections are defined here.
Table 4-2. Additional Special Sections
Name | Type | Attributes |
---|---|---|
.ctors | SHT_PROGBITS | SHF_ALLOC+SHF_WRITE |
.dtors | SHT_PROGBITS | SHF_ALLOC+SHF_WRITE |
.eh_frame | SHT_PROGBITS | SHF_ALLOC+SHF_WRITE |
.gnu.version | SHT_GNU_versym | SHF_ALLOC |
.gnu.version_d | SHT_GNU_verdef | SHF_ALLOC |
.gnu.version_r | SHT_GNU_verneed | SHF_ALLOC |
.note.ABI-tag | SHT_NOTE | SHF_ALLOC |
.stab | SHT_PROGBITS | 0 |
.stabstr | SHT_STRTAB | 0 |
This section contains a list of global constructor function pointers.
This section contains a list of global destructor function pointers.
This section contains information necessary for frame unwinding during exception handling. The format is the same as for .debug_frame as described by DWARF2.
This section contains the Symbol Version Table.
This section contains the Version Definitions.
This section contains the Version Requirments.
Specify ABI details.
This section contains debugging information. The contents are not specified as part of the LSB.
This section contains strings associated with the debugging infomation contained in the .stab section.