fix names and requires to get some elf out again (still crashes though)
This commit is contained in:
@ -3,7 +3,7 @@ Assembler in Ruby
|
||||
|
||||
Supporting arm, but aimed quite specifically at raspberry pi, arm v7, floating point included
|
||||
|
||||
Outputs ELF object files, with relocation support.
|
||||
Outputs Elf object files, with relocation support.
|
||||
|
||||
Constant table support exists but isn't very good. Some addressing modes
|
||||
are not supported or only partially supported.
|
||||
|
@ -1,3 +1,5 @@
|
||||
require_relative "relocation"
|
||||
|
||||
module Asm
|
||||
ERRSTR_NUMERIC_TOO_LARGE = 'cannot fit numeric literal argument in operand'
|
||||
ERRSTR_INVALID_ARG = 'invalid operand argument'
|
||||
|
@ -1,20 +1,24 @@
|
||||
require_relative 'elfobject'
|
||||
require 'elf/object_file'
|
||||
require 'elf/symbol_table_section'
|
||||
require 'elf/text_section'
|
||||
require 'elf/string_table_section'
|
||||
require 'elf/relocation_table_section'
|
||||
|
||||
module Asm
|
||||
|
||||
class ObjectWriter
|
||||
def initialize(target)
|
||||
@object = ELF::ObjectFile.new(target)
|
||||
@object = Elf::ObjectFile.new(target)
|
||||
|
||||
sym_strtab = ELF::StringTableSection.new(".strtab")
|
||||
sym_strtab = Elf::StringTableSection.new(".strtab")
|
||||
@object.add_section sym_strtab
|
||||
@symbol_table = ELF::SymbolTableSection.new(".symtab", sym_strtab)
|
||||
@symbol_table = Elf::SymbolTableSection.new(".symtab", sym_strtab)
|
||||
@object.add_section @symbol_table
|
||||
|
||||
@text = ELF::TextSection.new(".text")
|
||||
@text = Elf::TextSection.new(".text")
|
||||
@object.add_section @text
|
||||
|
||||
@reloc_table = ELF::RelocationTableSection.new(".text.rel", @symbol_table, @text)
|
||||
@reloc_table = Elf::RelocationTableSection.new(".text.rel", @symbol_table, @text)
|
||||
@object.add_section @reloc_table
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user