ElfEditor.addSegment
uint addSegment(uint type, uint flags, uint[] sections, ulong alignment = 0x1000)Add a segment (program header) to the ELF file.
Parameters
type | The segment type (PT_LOAD, PT_DYNAMIC, etc.). |
flags | The segment flags (PF_R, PF_W, PF_X). |
sections | An array of section indices to include in this segment. |
align | The segment alignment (default: 0x1000). |
Returns
The segment index.