Simplified file structure
This commit is contained in:
26
src/config/config.go
Normal file
26
src/config/config.go
Normal 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
|
||||
)
|
Reference in New Issue
Block a user