Simplified file structure

This commit is contained in:
2024-08-07 19:39:10 +02:00
parent 1b13539b22
commit 66569446b1
219 changed files with 453 additions and 457 deletions

26
src/config/config.go Normal file
View File

@ -0,0 +1,26 @@
package config
const (
// This is the absolute virtual minimum address we can load a program at, see `sysctl vm.mmap_min_addr`.
MinAddress = 0x10000
// The base address is the virtual address for our ELF file.
BaseAddress = 0x40 * MinAddress
// The code offset is the offset of the executable machine code within the file.
CodeOffset = 64 + 56 + 56
// Align decides the alignment of the sections and it must be a multiple of the page size.
Align = 0x1000
)
var (
// Shows the assembly instructions at the end of the compilation.
Assembler = false
// Calculates the result of operations on constants at compile time.
ConstantFold = true
// Skips writing the executable to disk.
Dry = false
)