ELF Format notes (3) -- Section Types, elfsection
The ELF file contains many sections. All sections have a corresponding item in the section header table. Each section header is an Elf32_Shdr structure used to describe the information of the corresponding section. The Elf32_Shdr structure has a sh_type member that specifies the section type.
SHT_NULL: Invalid section header. There is no corresponding section, and other Members in the section header are meaningless.
SHT_PROGBITS: many sections belong to this type, such as. text,. data,. got,. plt,. rodata,. interp, and so on.
SHT_SYMTAB/SHT_DYNSYM: These two sections store the symbol table. SHT_DYNSYM contains a dynamic link symbol table.
SHT_STRTAB: stores string tables. Generally, an ELF file contains more than one string table. For example,. shstrtab is a string table used to store section names.
SHT_RELA/SHT_REL: contains a relocation table. Generally, there are more than one section of this type, such as. rel. plt and. rel. dyn.
SHT_HASH: stores the hash table corresponding to the symbol table. It is used to quickly locate the corresponding symbol in the symbol table based on the specified symbol name.
SHT_DYNAMIC: Contains dynamic connection information. dynamic belongs to this type.
SHT_NOTE: contains some comments.
SHT_NOBITS: This section does not occupy space in the file, typically. bss .. Bss exists in the memory and stores uninitialized global variables.
SHT_SHLIB, SHT_LOPROC/SHT_HIPROC, SHT_LOUSER/SHT_HIUSER: basically unavailable, don't worry.