ELF Format notes (3) -- Section Types, elfsection

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.