Currently we don't allow the following definition:
Sections: - Type: SectionHeaderTable - Name: .foo Type: SHT_PROGBITS
We report an error: "SectionHeaderTable can't be empty. Use 'NoHeaders' key to drop the section header table".
It was implemented in this way earlier, when SectionHeaderTable
was a dedicated key outside of the Sections list. And we did not
allow to select where the table is written.
Currently it makes sense to allow it, because a user might
want to place the default section header table at an arbitrary position,
e.g. before other sections. In this case it is not convenient and error prone
to require specifying all sections:
Sections: - Type: SectionHeaderTable Sections: - Name: .foo - Name: .strtab - Name: .shstrtab - Name: .foo Type: SHT_PROGBITS
This patch allows empty SectionHeaderTable definitions.
I think this sounds better English to me, though I can't place specifically what was wrong before!