27 lines
712 B
Go
Raw Normal View History

2023-10-29 12:24:40 +01:00
package config
const (
2024-07-13 14:18:55 +02:00
// 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.
2023-10-29 12:24:40 +01:00
BaseAddress = 0x40 * MinAddress
2024-07-13 14:18:55 +02:00
// 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
2023-10-29 12:24:40 +01:00
)
2023-10-31 21:13:14 +01:00
var (
2024-07-29 14:44:16 +02:00
// Shows the assembly instructions at the end of the compilation.
2024-06-30 00:17:14 +02:00
Assembler = false
2024-07-29 14:44:16 +02:00
// Calculates the result of operations on constants at compile time.
ConstantFold = true
// Skips writing the executable to disk.
Dry = false
2023-10-31 21:13:14 +01:00
)