fn ElfObject.new() &ElfObject
fn Gen.new(mod &ssa.Module) &Gen
struct ElfObject {
pub mut:
text_data []u8
data_data []u8
rodata []u8
symbols []ElfSymbol
str_table []u8
text_relocs []ElfRela
shstr_table []u8
}
fn (ElfObject) add_symbol #
fn (mut e ElfObject) add_symbol(name string, value u64, is_func bool, shndx u16) int
fn (ElfObject) add_undefined #
fn (mut e ElfObject) add_undefined(name string) int
fn (ElfObject) add_text_reloc #
fn (mut e ElfObject) add_text_reloc(offset u64, sym_idx int, type_ int, addend i64)
fn (mut e ElfObject) write(path string)
struct Gen {
mod &ssa.Module
mut:
elf &ElfObject
stack_map map[int]int
alloca_offsets map[int]int
stack_size int
curr_offset int
block_offsets map[int]int
pending_labels map[int][]int
reg_map map[int]int
used_regs []int
}
fn (mut g Gen) write_file(path string)