package elf // ProgramHeaderSize is equal to the size of a program header in bytes. const ProgramHeaderSize = 56 // ProgramHeader points to the executable part of our program. type ProgramHeader struct { Type ProgramType Flags ProgramFlags Offset int64 VirtualAddress int64 PhysicalAddress int64 SizeInFile int64 SizeInMemory int64 Align int64 } type ProgramType int32 const ( ProgramTypeNULL ProgramType = 0 ProgramTypeLOAD ProgramType = 1 ProgramTypeDYNAMIC ProgramType = 2 ProgramTypeINTERP ProgramType = 3 ProgramTypeNOTE ProgramType = 4 ProgramTypeSHLIB ProgramType = 5 ProgramTypePHDR ProgramType = 6 ProgramTypeTLS ProgramType = 7 ) type ProgramFlags int32 const ( ProgramFlagsExecutable ProgramFlags = 0x1 ProgramFlagsWritable ProgramFlags = 0x2 ProgramFlagsReadable ProgramFlags = 0x4 )