1

For the Executable and Linkable Format, sections describe information in an object file. In the ELF specification, it is mentioned that there may be section headers that are not followed by a section:

Every section in an object file has exactly one section header describing it. Section headers may exist that do not have a section.

Furthermore, section headers of type SHT_NULL are considered 'inactive', and thus do not have an associated section:

This value marks the section header as inactive; it does not have an associated section. Other members of the section header have undefined values.

I'm curious as to what sort of section headers typically do not have associated sections.The way it is phrased in the specification, there are reserved indices in the section header table; dictating reserved section indices that do not have sections:

Some section header table indexes are reserved; an object file will not have sections for these special indexes.

However, the phrasing leads me to believe that there may be other section headers that usually have no associated sections. Am I mistaken? If not, what are they?

Caterpillar
  • 599
  • 6
  • 20

1 Answers1

0

By the statement, section headers may exist that don't have a section, it means that it may not occupy space in the file. SHT_NOBITS is a type of section header that occupies zero bytes in the file.

Shukant Pal
  • 706
  • 6
  • 19