Class: Voodoo::AMD64ELFGenerator

Inherits:
AMD64NasmGenerator show all
Defined in:
lib/voodoo/generators/amd64_elf_generator.rb

Overview

Generator that produces ELF objects for amd64

Instance Method Summary collapse

Methods inherited from AMD64NasmGenerator

#arg_offset, #begin_function, #call, #end_function, #load_arg, #load_symbol_from_got, #local_offset_or_register, #number_of_register_arguments, #number_of_register_locals, #number_of_stack_arguments, #number_of_stack_locals, #push_qword, #register_argument?, #ret, #saved_local_offset, #tail_call, #word

Methods inherited from NasmGenerator

#action_to_mnemonic, #auto_bytes, #auto_bytes_immediate, #auto_bytes_register, #auto_words, #begin_block, #byte, #comment, #common_if, #div, #div2, #dword, #emit_align, #emit_function_epilogue, #emit_label, #emit_label_size, #emit_label_type, #emit_load_word, #emit_store_word, #end_block, #end_function, #end_if, #eval_div, #eval_expr, #eval_mul, #export, #goto, #ifelse, #ifeq, #ifge, #ifgt, #ifle, #iflt, #ifne, #immediate_operand?, #import, #let, #load_address, #load_at, #load_symbol, #load_value, #load_value_into_register, #memory_operand?, #mod, #mod2, #mul, #mul2, #offset_reference, #qword, #ret, #set, #set_byte, #set_register, #set_word, #string

Methods inherited from CommonCodeGenerator

#add, #add_function, #align, #assymetric_binop?, #at_expr?, #binop?, #block, #count_locals, #default_alignment, #each_statement, #emit, #emit_label, #emit_voodoo, #export, #features, #function, #gensym, #global?, #has_feature?, #import, #in_section, #integer?, #label, #local_register, #number_of_register_arguments, #number_of_stack_arguments, #real_section_name, #register?, #register_arg?, #registers_for_locals, #restore_frame, #restore_locals, #restore_registers_from_frame, #save_frame, #save_frame_and_locals, #save_locals, #save_registers_to_frame, #saved_frame_size, #section, #section=, #section_alias, #stack_align, #substitute_number, #substitution?, #symbol?, #symmetric_binop?, #with_temporaries, #with_temporary

Constructor Details

#initialize(params = {}) ⇒ AMD64ELFGenerator

Returns a new instance of AMD64ELFGenerator.



9
10
11
12
13
# File 'lib/voodoo/generators/amd64_elf_generator.rb', line 9

def initialize params = {}
  @nasmgenerator = AMD64NasmGenerator.new params
  super(@nasmgenerator)
  @elfgenerator = NasmELFGenerator.new @nasmgenerator, '-f elf64'
end

Instance Method Details

#output_file_name(input_name) ⇒ Object



15
16
17
# File 'lib/voodoo/generators/amd64_elf_generator.rb', line 15

def output_file_name input_name
  @elfgenerator.output_file_name input_name
end

#output_file_suffixObject



19
20
21
# File 'lib/voodoo/generators/amd64_elf_generator.rb', line 19

def output_file_suffix
  @elfgenerator.output_file_suffix
end

#write(io) ⇒ Object



23
24
25
# File 'lib/voodoo/generators/amd64_elf_generator.rb', line 23

def write io
  @elfgenerator.write io
end