adds first version of the expanded as assembler from mikko
This commit is contained in:
21
lib/elf/text_section.rb
Normal file
21
lib/elf/text_section.rb
Normal file
@ -0,0 +1,21 @@
|
||||
module Elf
|
||||
class TextSection < Section
|
||||
attr_accessor :text
|
||||
|
||||
def write(io)
|
||||
io << text
|
||||
end
|
||||
|
||||
def type
|
||||
Elf::Constants::SHT_PROGBITS
|
||||
end
|
||||
|
||||
def flags
|
||||
Elf::Constants::SHF_ALLOC | Elf::Constants::SHF_EXECINSTR
|
||||
end
|
||||
|
||||
def alignment
|
||||
4
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user