ElfBuilder.addSection
uint addSection(string name, uint type, ulong flags, const(ubyte)[] data = null,
uint link = 0, uint info = 0, ulong addralign = 1, ulong entsize = 0)Add a section to the ELF file.
The null section (index 0) is automatically added as the first section. The section name is automatically added to the section header string table.
Parameters
name | The section name. |
type | The section type. |
flags | The section flags. |
data | The section data (can be null for NOBITS sections). |
link | The section link field (default: 0). |
info | The section info field (default: 0). |
addralign | The section alignment (default: 1). |
entsize | The entry size if section contains entries (default: 0). |
Returns
The section index.