Improved project structure

This commit is contained in:
Eduard Urbach 2023-10-20 17:07:44 +02:00
parent 3a002a7562
commit bd73132a30
Signed by: eduard
GPG key ID: 49226B848C78F6C8
18 changed files with 33 additions and 15 deletions

34
src/elf/Header.go Normal file
View file

@ -0,0 +1,34 @@
package elf
const (
LittleEndian = 1
TypeExecutable = 2
ArchitectureAMD64 = 0x3E
HeaderSize = 64
CacheLineSize = 64
Align = CacheLineSize
)
// Header contains general information.
type Header struct {
Magic [4]byte
Class byte
Endianness byte
Version byte
OSABI byte
ABIVersion byte
_ [7]byte
Type int16
Architecture int16
FileVersion int32
EntryPointInMemory int64
ProgramHeaderOffset int64
SectionHeaderOffset int64
Flags int32
Size int16
ProgramHeaderEntrySize int16
ProgramHeaderEntryCount int16
SectionHeaderEntrySize int16
SectionHeaderEntryCount int16
SectionNameStringTableIndex int16
}